Rationale for no leading space in //nolint:mylinter
?
#3271
-
The - // nolint: gocyclo
+ //nolint: gocyclo
func myBigFunc() error { The rule was introduced in #837. Then it became a hard rule, as discussed briefly here: #1658 (comment) However, this seems to go against the new go formatting rules introduced in //nolint: gocyclo
func myBigFunc() error { But if you run // nolint: gocyclo
func myBigFunc() error { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Hello,
The option The syntax of directives is: I already explained that in all the linked issues of #1658 |
Beta Was this translation helpful? Give feedback.
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