Skip to content

Rationale for no leading space in //nolint:mylinter? #3271

Closed Answered by ldez
sebastien-rosset asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

nolint is a directive, not a comment, the new Go fmt adds a space before a comment, not before a directive.

The option allow-leading-space has been dropped.

The syntax of directives is: //[a-zA-Z]+:[a-zA-Z].*.
The spaces around : and after the // must be removed.

I already explained that in all the linked issues of #1658

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@bombsimon
Comment options

@ldez
Comment options

ldez Oct 4, 2022
Maintainer

@sebastien-rosset
Comment options

sebastien-rosset Oct 4, 2022
Collaborator Author

@bombsimon
Comment options

@ldez
Comment options

ldez Oct 4, 2022
Maintainer

Answer selected by ldez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants