Skip to content

Update lint to use golangci-lint v2#168

Merged
acornett21 merged 1 commit intoredhat-openshift-ecosystem:mainfrom
caxu-rh:golangci-lint-config-migration
May 14, 2025
Merged

Update lint to use golangci-lint v2#168
acornett21 merged 1 commit intoredhat-openshift-ecosystem:mainfrom
caxu-rh:golangci-lint-config-migration

Conversation

@caxu-rh
Copy link
Copy Markdown
Contributor

@caxu-rh caxu-rh commented May 14, 2025

  • Update Makefile to get and use golangci-lint v2
  • Update .golangci-lint.yaml file to match v2 config file format
  • Address/ignore findings raised by staticcheck

- Update Makefile to get and use golangci-lint v2
- Update .golangci-lint.yaml file to match v2 config file format
- Address/ignore findings raised by staticcheck

Signed-off-by: Caleb Xu <caxu@redhat.com>
@openshift-ci openshift-ci bot requested review from acornett21 and skattoju May 14, 2025 15:59
@acornett21
Copy link
Copy Markdown
Contributor

@caxu-rh This doesn't break any of the other make cmds? ie these changes don't get overlayed/overwritten by:

generate
manifests
bundle

I guess since CI got past generate and manifest we are fine there, did you test bundle?

@caxu-rh
Copy link
Copy Markdown
Contributor Author

caxu-rh commented May 14, 2025

make generate, make manifest, make bundle all seem to work (no errors). After running these on top of the commit in this branch, the only untracked change is in config/manager/kustomization.yaml, which I assume is caused by me running locally, not by the lint change:

diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml
index 6604f8b..4555d47 100644
--- a/config/manager/kustomization.yaml
+++ b/config/manager/kustomization.yaml
@@ -13,4 +13,4 @@ kind: Kustomization
 images:
 - name: controller
   newName: quay.io/opdev/operator-certification-operator
-  newTag: 0.0.0
+  newTag: latest

The .golangci.yaml already seems to attempt to exclude generated files, too.

@acornett21
Copy link
Copy Markdown
Contributor

I see that change as well, it's not caused by your change.

@acornett21 acornett21 merged commit 801eb64 into redhat-openshift-ecosystem:main May 14, 2025
1 check passed
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.

2 participants