Closed cold-bin closed 1 week ago
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.
Hello,
this already exists inside golangci-lint: revive, stylecheck, etc.
The only existing linter I know that looks like what is requested would be revive:comment-density
https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#comments-density
thank for your reply
The only existing linter I know that looks like what is requested would be revive:comment-density
This issue is about comments, so there several rules inside revive and stylecheck.
But remember that by default, golangci-lint skips those reports.
https://golangci-lint.run/usage/false-positives/#default-exclusions
To disable those exclusions:
issues:
exclude-use-default: false
Thanks for providing this information. I totally missed that parameter even I'm using golangci-lint for a while.
I'll have a look, thanks
Welcome
Your feature request related to a problem? Please describe
When a new person takes over a large project, it will be painful if there are no comments. This is how I feel that necessary comments need to be provided for public types, variables, functions or methods to facilitate the new person to quickly familiarize themselves with the project.
Describe the solution you'd like
use go/analyze package to recursive traversal ast comment or documention node. if empty the comment and documention node, then call
reportf
. the link of https://github.com/cold-bin/declaration-comment is my implementDescribe alternatives you've considered
nothing, this way can solve no comments of many complex type
Additional context
No response
Supporter