mgechev / revive

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

`comment-spacings` false positive for /**/ style comments #795

Open s3rj1k opened 1 year ago

s3rj1k commented 1 year ago

comment-spacings for some reason is triggered not only for // comments but also for /**/ style comments. Without the ability to disable this behavior this linter is pretty-much unusable when code has a lot of multi-line comments.

chavacava commented 1 year ago

Hi @s3rj1k thanks for filling the issue.

My understanding is that you want no linter warning on comments like

/*There is no space between * and T */

?

(If the this rule is too noisy, you can disable it until this issue is closed)

s3rj1k commented 1 year ago

@chavacava Thanks for quick ping-back.

I am using IDE and multi-line comments that contain dots are getting autoformated from /* ... */ to

/*
-->TAB Text.
-->TAB More text.
*/

Also considering some of my code has really big comments within /* ... */, some quotes from Linux kernel for example, it would be nice to have some flag to disable processing /* ... */ style comments entirely.

P.S. Not directly related to this issue but //nolint should be whitelisted by default, can be configured so not a big issue.