Skip to content

nolint comments are not working #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dvyukov opened this issue Mar 28, 2019 · 2 comments
Closed

nolint comments are not working #468

dvyukov opened this issue Mar 28, 2019 · 2 comments
Labels
area: cgo Related to CGO or line directives area: nolint Related to nolint directive and nolintlint bug Something isn't working

Comments

@dvyukov
Copy link

dvyukov commented Mar 28, 2019

//nolint comments are not working, I am getting:

pkg/ifuzz/decode.go:13:1: cyclomatic complexity 75 of func `Decode` is high (> 24) (gocyclo)
func Decode(mode int, text []byte) (int, error) { //nolint:gocyclo
golangci-lint has version v1.15.0-21-gf516771 built from f516771 on Thu Mar 28 14:06:02 CET 2019
jirfag added a commit that referenced this issue Apr 20, 2019
Preprocessed files like .qtpl.go quicktemplate Go files can have
//line directives. They map to a source .qtpl file.
This commit fixes linting of such files:
1. don't fail on AST cache loading
2. output Go filename not .qtpl or similar

Also, here we update golint to the upstream version.

Relates: #316, #466, #467, #468
jirfag added a commit that referenced this issue Apr 20, 2019
Preprocessed files like .qtpl.go quicktemplate Go files can have
//line directives. They map to a source .qtpl file.
This commit fixes linting of such files:
1. don't fail on AST cache loading
2. output Go filename not .qtpl or similar

Also, here we update golint to the upstream version.

Relates: #316, #466, #467, #468
jirfag added a commit that referenced this issue Apr 20, 2019
Preprocessed files like .qtpl.go quicktemplate Go files can have
//line directives. They map to a source .qtpl file.
This commit fixes linting of such files:
1. don't fail on AST cache loading
2. output Go filename not .qtpl or similar

Also, here we update golint to the upstream version.

Relates: #316, #466, #467, #468
jirfag added a commit that referenced this issue Apr 20, 2019
Skip yacctab, yaccpar and NONE files.

Relates: #467, #468
@jirfag
Copy link
Contributor

jirfag commented Apr 20, 2019

Hi, thank you!
The issue was because of poor .rl and .y files support. I've fixed it in #504 and #505.

I've run golangci-lint on the github.com/google/syzkaller: gocyclo doesn't report about pkg/ifuzz/decode.go.

jirfag added a commit that referenced this issue Apr 20, 2019
Skip yacctab, yaccpar and NONE files.

Relates: #467, #468
@dvyukov
Copy link
Author

dvyukov commented Apr 23, 2019

Now everything seems to work as expected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: cgo Related to CGO or line directives area: nolint Related to nolint directive and nolintlint bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants