-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
nollint rule should be written without leading space as //nolint conflicts with gofmt #3109
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, Due to a change of So the option The syntax of directives is: // nolint:foo // <-- malformed
//nolint :foo // <-- malformed
//nolint: foo // <-- malformed
//nolint:foo // <-- OK If you do that your IDE or go fmt will format the directive as a directive and it will not add extra space. Related to: |
Thanks and sorry for the dup. Just to clarify for others: Search and replace The conflict issue I had was keeping the space after nolint: (which isn't super obvious from your reply) |
also it's a bit of an ugly rule because
is fine/accepted why is that space ok |
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
See also: golangci/golangci-lint#3109 Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
See also: golangci/golangci-lint#3109 Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
See also: golangci/golangci-lint#3109 Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives.
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives. (cherry picked from commit bf5401e)
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives. (cherry picked from commit bf5401e)
There was a change for nolint directives: golangci/golangci-lint#3109 (comment) And we are adding confidence of 0.8 in revive to avoid false positives. (cherry picked from commit bf5401e)
Welcome
Description of the problem
VSCode and the gofmt linters force the comments to be
// nolint:...
(one space) and nolintlint wants no space
gofmt probably should win
so basically the default config in golangci-lint should not be
because it conflicts with
gofmt
(and the same rules)Version of golangci-lint
Configuration file
Go environment
both go1.18.5 and go.19 on both linux amd 64 and macos arm64
Verbose output of running
Code example or link to a public repository
https://github.com/fortio/fortio/blob/master/log/logger.go#L67
The text was updated successfully, but these errors were encountered: