Skip to content

v3 Add integration with golangci-lint - #1697

Merged
skelouse merged 5 commits into
urfave:mainfrom
skelouse:main
Mar 15, 2023
Merged

skelouse merged 5 commits into
urfave:mainfrom
skelouse:main

Conversation

@skelouse

@skelouse skelouse commented Mar 8, 2023

Copy link
Copy Markdown
Contributor

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

avorima commented Mar 9, 2023

Copy link
Copy Markdown

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

skelouse commented Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

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

skelouse commented Mar 10, 2023 •

Copy link
Copy Markdown
Contributor Author

@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