Skip to content
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

Setup golangci-lint as default linter framework #994

Merged
merged 2 commits into from
Oct 24, 2019

Conversation

nfnt
Copy link
Member

@nfnt nfnt commented Oct 24, 2019

What this PR does / why we need it:
golanci-lint is a meta-linter that provides all linters that were previously used in a single binary. Running this from a single binary results in improved performance and consistent linter output. Furthermore it will allow us to enable additional linters in the future by adding the to .golanci.yml. A default configuration has been provided that matches the existing linter configuration but also adds a few more linters. Furthermore a pre-commit configuration is provided.

Fixes #795

golanci-lint provides all linters that were previously used in a single binary. A default configuration has been provided that matches the existing linter configuration but also adds a few more linters. Furthermore a pre-commit configuration is provided.
Makefile Show resolved Hide resolved
@nfnt nfnt requested a review from zen-dog October 24, 2019 12:46
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm! 🚢

@nfnt nfnt merged commit 509a40b into master Oct 24, 2019
@nfnt nfnt deleted the nfnt/golangci-lint-default-config branch October 24, 2019 13:45
@porridge
Copy link
Member

@nfnt you removed the staticcheck and vet targets, but [STYLEGUIDE.md] still points to them. (This BTW proves how closely people pay attention to rules which are not enforced :-)

Does this mean that golang-ci lint now also includes the vet and staticcheck steps and these instructions are obsolete?

@nfnt
Copy link
Member Author

nfnt commented Dec 18, 2019

@porridge Good catch! The instructions are obsolete, golanci-lint include vet and staticcheck. I'll update the styleguide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use 'golangci-lint' for linting code
4 participants