mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.78k stars 279 forks source link

Remove added colon in `comment-spacings` rule #981

Closed gfariasalves-ionos closed 5 months ago

gfariasalves-ionos commented 5 months ago

Please, describe in details what's your motivation for this PR:

Some projects like Kubebuilder have markers that do not follow the pattern //name:, e.g.: //+optional. Due to a colon added at the end of the values when parsing the arguments, revive complains about comments starting with the marker even if one adds it as an exception.

Did you add tests?

The current tests are still valid with the changes.

Does your code follow the coding style of the rest of the repository?

Yes.

Closes #980

chavacava commented 5 months ago

Thank you @gfariasalves-ionos for the PR. I've left some nit comments on the documentation of the rule. Could you please also add test cases for the the new use case ( something+)

gfariasalves-ionos commented 5 months ago

Please check again :)

chavacava commented 5 months ago

Merged. Thanks Gustavo!