-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add consistent
linter
#2778
add consistent
linter
#2778
Conversation
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements. Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
I have since added GitHub actions for linting, unit testing and checking code coverage to the linter's repository. |
Edit: I have changed the linter such that it no longer uses an init function. |
I have some remarks on this linter:
|
@ldez just to share an outsiders perspective: After reviewing the linter examples, I believe this linter is very useful on its own for enforcing a certain codingstyle. Many of the configurable settings still vary in the Go community, so you probably want to be stricter in enterprise level projects with stronger uniformity requirements. |
Is there anything I can do so that this PR can be merged? Please advise. |
I'm not sure what that means. Should I change anything specific?
If you could point me to those existing linters you mentioned, that would be very helpful.
Again, I'm not sure what this means. Do I need to convert my linter to a "meta linter"? If so, how would I go about doing that? |
This PR adds https://github.com/blizzy78/consistent as a new linter. This linter checks that common Go constructs are used consistently.
This linter is similar to go-consistent, but not quite the same. go-consistent uses auto-detection, while this linter must be configured manually. I also believe that this linter checks things more thoroughly than go-consistent, including an extensive test suite which also tests for false positives.
go-consistent has been requested in #288. This PR adds much of the requested functionality.