Skip to content

Commit

Permalink
fix: linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sylwang committed Aug 11, 2023
1 parent 6339ce9 commit bef0e01
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func enterBlockCtx(stmt *Directive, ctx blockCtx) blockCtx {
return append(ctx, stmt.Directive)
}

//nolint:gocyclo,cyclop,funlen,gocognit
//nolint:gocyclo,gocognit,cyclop,funlen
func analyze(fname string, stmt *Directive, term string, ctx blockCtx, options *ParseOptions) error {
masks, knownDirective := directives[stmt.Directive]
currCtx, knownContext := contexts[ctx.key()]
Expand Down
2 changes: 1 addition & 1 deletion build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ var compareFixtures = []compareFixture{
{"empty-config", ParseOptions{}},
}

//nolint:gocognit,cyclop,funlen
//nolint:cyclop,funlen,gocognit
func TestCompareParsedAndBuilt(t *testing.T) {
t.Parallel()
for _, fixture := range compareFixtures {
Expand Down
2 changes: 1 addition & 1 deletion lex.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Lex(reader io.Reader) chan NgxToken {
return tc
}

//nolint:gocyclo,cyclop,funlen,gocognit
//nolint:gocyclo,gocognit,cyclop,funlen
func tokenize(reader io.Reader, tokenCh chan NgxToken) {
token := strings.Builder{}
tokenLine := 1
Expand Down
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (p *parser) openFile(path string) (io.Reader, error) {

// parse Recursively parses directives from an nginx config context.
//
//nolint:gocyclo,cyclop,funlen,gocognit,maintidx,nonamedreturns
//nolint:gocyclo,gocognit,cyclop,funlen,maintidx,nonamedreturns
func (p *parser) parse(parsing *Config, tokens <-chan NgxToken, ctx blockCtx, consume bool) (parsed Directives, err error) {
var tokenOk bool
// parse recursively by pulling from a flat stream of tokens
Expand Down

0 comments on commit bef0e01

Please sign in to comment.