Skip to content
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

nolint directive is not feature compatible with gometalinter #65

Closed
alecthomas opened this issue Jun 4, 2018 · 2 comments
Closed

nolint directive is not feature compatible with gometalinter #65

alecthomas opened this issue Jun 4, 2018 · 2 comments
Labels
area: nolint Related to nolint directive and nolintlint enhancement New feature or improvement

Comments

@alecthomas
Copy link
Contributor

In gometalinter, nolint directives can be applied to a branch in the AST, as well as directly on the offending line. golangci-lint does not support the former.

For example, the following does not work:

// nolint
func someFunc() {
  anUnusedVar := true
}

while this does work:

func someFunc() {
  anUnusedVar := true // nolint
}

It would be very helpful if golangci-lint were compatible with gometalinter for nolint directives.

@jirfag jirfag added the enhancement New feature or improvement label Jun 6, 2018
jirfag added a commit that referenced this issue Jun 6, 2018
…irectives

#65, #68: make //nolint processing like in gometalinter
@jirfag
Copy link
Contributor

jirfag commented Jun 6, 2018

thank you for the issue, fixed in master and in the latest release v1.5

@alecthomas
Copy link
Contributor Author

Perfect, thanks!

@ldez ldez added the area: nolint Related to nolint directive and nolintlint label Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nolint Related to nolint directive and nolintlint enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants