-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
dev: enhance help linters output on fast and auto-fix capabilities #5207
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
7f9d097
to
a52e438
Compare
I like the colors. But there is something strange with the non-fast one. I find uneasy to visually spot the ones that are not available in fast mode. |
Maybe [non-fast] in orange? UI is never fun. This is a random feedback, feel free to ignore or wait for ldez feedback |
This will make it more complex to filter linter with grep. Also, IMO, having different colors for "fast"/"slow" is not right because it will imply a negative impression of "slow" linters. |
Maybe we can introduce flags for this use case:
|
This will not work because the help contains more than linters, so grep is still the best approach. It will also create an unnecessary complexity just for a help command. |
After more thinking, I have a better idea to solve the grep problem, I will do a PR on this topic. If my PR works, we will merge the 2 PRs. |
I opened #5209 |
- fast: blue - auto-fix: green
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.
LGTM
The PR changes the output for the
golangci-lint linters help
command.I think outputting
[fast: false, auto-fix: false]
is redundant, andhelp
prints nothing if the linter is slow and does not have auto-fix. If a linter is fast, the command prints green[fast]
. If a linter can auto fix, the command prints green[auto-fix]
. If a linter is fast and has auto fix -[fast, auto-fix]
in green.Before
After