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

v3 Add integration with golangci-lint #1697

Merged
merged 5 commits into from
Mar 15, 2023
Merged

v3 Add integration with golangci-lint #1697

merged 5 commits into from
Mar 15, 2023

Conversation

skelouse
Copy link
Contributor

@skelouse skelouse commented Mar 8, 2023

What type of PR is this?

  • github action

What this PR does / why we need it:

adds an action for golangci-lint run

Which issue(s) this PR fixes:

Fixes #1663

Testing

https://github.com/skelouse/cli/actions/runs/4361565058

Release Notes

Integrate golangci-lint action

@skelouse skelouse requested a review from a team as a code owner March 8, 2023 05:54
@avorima
Copy link
Contributor

avorima commented Mar 9, 2023

Is there a plan to also add a .golanci.yml file? I find the default config that it uses somewhat lacking. I think at least some linters from the bugs preset category would be good to have, for example the makezero linter would've spotted the following: errors.go:45:10: append to slice errs with non-zero initialized length.
https://golangci-lint.run/usage/linters/ has a table with linters and their presets.

@skelouse
Copy link
Contributor Author

skelouse commented Mar 9, 2023

Is there a plan to also add a .golanci.yml file? I find the default config that it uses somewhat lacking. I think at least some linters from the bugs preset category would be good to have, for example the makezero linter would've spotted the following: errors.go:45:10: append to slice errs with non-zero initialized length. https://golangci-lint.run/usage/linters/ has a table with linters and their presets.

Adding more linters will be a future iteration, as that will entail cleaning up those bugs as well as integrating them. I will look into adding the golangci.yml.

avorima
avorima previously approved these changes Mar 9, 2023
@skelouse
Copy link
Contributor Author

skelouse commented Mar 10, 2023

@avorima I've added the .golangci.yaml along with the misspell package. If anything else should be added we can make an issue for it along with the current output of running the additional linter. I also confirmed that this file is parsed by the github action.

@skelouse skelouse merged commit d1525cc into urfave:main Mar 15, 2023
This was referenced Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration with golangci-lint
2 participants