Run golangci-lint in the gate#17
Conversation
|
@umago: One thing crossed my mind. Are these changes going to be compatible with the linters configs that are used in the openstack-k8s-operators namespace? I've noticed that there is for example this linter (looks like some sort of custom linter) set up in the openstack operator repositories:
I'm not even sure whether we want that. But I guess if we later move to that namespace we should adhere to their linter rules (?). But I guess not a big deal now. It just crossed my mind. |
|
@lpiwowar I can try to run this linter and see if it works but, as you said, just looking at the project it doesn't seem well maintained. Last commit was on Feb 20, 2024. If we need to merge again into their namespace, I think we can adapt when we do it ? Since we don't even know if we are going to do it anytime soon, I would rather use something more mainstream and well maintained. What you think ? |
|
It is all good. It just crossed my mind. For now this is definitelly more than enough 👍 . It is strange because I think the unmaintained tool still runs as part of their CI (in the pre-commit job). |
f082db4 to
2b88b0a
Compare
lpiwowar
left a comment
There was a problem hiding this comment.
LGTM 👍
It looked good to me at the beginning but I let Claude to take a look and it suggested the two things I'm mentioning in the comments. I think the comment about the actions/checkout version is a good one.
Adds golangci-lint to the gate and pre-commit hooks. The golangci-lint is a meta-linter built for CI use-case. This patch also: * Migrates the .golangci.yml configuration to version 2 * Updates the Makefile to be able to install the version 2.X of golangci-lint * Fix the current errors in the code Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Update the README file on running pre-commit hooks prior to submitting a PR to the project. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
|
Thanks for the review and ideas! |
The golangci-lint is a meta-linter built for CI use-case.
This patch also: