Skip to content

fix: golangci-lint errors by providing constants and ignore tests#143

Open
ma-hartma wants to merge 1 commit into
mainfrom
linter-fix
Open

fix: golangci-lint errors by providing constants and ignore tests#143
ma-hartma wants to merge 1 commit into
mainfrom
linter-fix

Conversation

@ma-hartma
Copy link
Copy Markdown
Contributor

Description

The new golangci-lint version made the linter workflow produce some new errors.
This adds some constants where it makes sense and ignores the test files.

Used AI-Tools ✨

  • Claude Sonnet 4.6 for batch edits

@metal-robot metal-robot Bot added the area: cluster-api Affects the cluster-api area. label May 22, 2026
@ma-hartma ma-hartma requested a review from vknabel May 22, 2026 10:14
Comment thread internal/controller/constants.go
Comment on lines +4 to +5
addonsV1alpha1APIVersion = "addons.cluster.x-k8s.io/v1alpha1"
addonsV1beta2APIVersion = "addons.cluster.x-k8s.io/v1beta2"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there already are constants in a dependency for this? Would be worth investigating.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not, would introduce a new dependency sigs.k8s.io/cluster-api-addon-provider-helm. Instead, I will exclude that directory for the linter, too.

Comment thread test/e2e/frmwrk/cluster_upgrade_kubernetes_test.go
Comment thread internal/controller/constants_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cluster-api Affects the cluster-api area.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants