-
-
Couldn't load subscription status.
- Fork 1.5k
feat: implement stats per linter with a flag #4341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hey, thank you for opening your first Pull Request ! |
|
Hello, I made some modifications:
|
421db27 to
2151d87
Compare
|
Awesome! Thanks! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution to golangci-lint.
Your PR will benefit many users.
|
Thanks for tending to it so quickly! 🙏 |
Co-authored-by: Anton Telyshev <anton.telishev@yandex.ru>
In this PR I added a flag that enables basic stats collection and printing per linter using the
--show-stats-per-linterflag to therunsubcommand. This only prints the stats to the terminal after running all the linters.Note to the reviewers:
I tried implementing it using
e.runAnalysisto return the stats from therun.Run, yet it made things more complicated. I can still do it if you prefer that approach and I'd be happy to have your feedback. Also, I can either update theprinters.Printinterface to accept the stats or add a extra field (somewhere), so that the stats are printed based on the formatter used, and not just to the terminal.Closes #2924.