Add golangci-lint to CI process
algochoi opened this issue · comments
Problem
Supercedes #168
We want to enforce a linter in the Go SDK repo, just like our other repos.
Solution
- Add
reviewdog/action-golangci-lint@v2
Github Actions workflow- We can enforce it after a particular commit hash, and slowly fix existing lint errors over time or just fix those errors at once.
- Add a
.golangci.yml
file (use Conduit configurations as an example)- We should exclude generated files from linters as we cannot control those
- Use
golangci-lint
in themake lint
step. We can also add ago vet
step.
Considerations:
- Have a clean git history by hiding lint commits, see this
- Github seems to natively support this now: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
- Split up linting PRs