-
-
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
conflict results between gofmt and nolintlint #3110
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: |
Thank you @bombsimon ! |
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Nolintlint wants the //nolint directives without a leading space GoFmt wants them with a leading space, ... except if nolint has no space afterwards: // nolint:foo // <-- malformed //nolint :foo // <-- malformed //nolint: foo // <-- malformed //nolint:foo // <-- OK See golangci/golangci-lint#3110 (comment)
Welcome
Description of the problem
I have used
// nolint: ireturn
with following golangci-lint config.When I run
golangci-lint run
, nolintlint has showeddirective `// nolint: ireturn` should be written without leading space as `//nolint: ireturn` (nolintlint)
.Then I run
golangci-lint run
with nolintlint config both ofallow-leading-space: false
andallow-leading-space: true
, gofmt has showedFile is not `gofmt`-ed with `-s` (gofmt)
.Version of golangci-lint
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
The text was updated successfully, but these errors were encountered: