canonical / k8s-snap

Canonical Kubernetes is an opinionated and CNCF conformant Kubernetes operated by Snaps and Charms, which come together to bring simplified operations and an enhanced security posture on any infrastructure.
GNU General Public License v3.0
43 stars 13 forks source link

Add linter for Go #710

Closed maci3jka closed 1 month ago

maci3jka commented 1 month ago

This PR improves the development experience. It adds to go checks the linter golangci-lint, aggregating the number of liners and adding annotations on the PR with found issues. Additionally, it introduces go.lint target to makefile which allows running the same set of linters locally.

maci3jka commented 1 month ago

example of working https://github.com/canonical/k8s-snap/pull/722/files

image

bschimke95 commented 1 month ago

I added a list of all linters and disabled them. Now I will gradually enable all of the linters and fix the relevant code pieces as separate PRs.