Skip to content

Add Kube API linter#541

Open
inteon wants to merge 1 commit intomainfrom
add_kube_api_lint
Open

Add Kube API linter#541
inteon wants to merge 1 commit intomainfrom
add_kube_api_lint

Conversation

@inteon
Copy link
Member

@inteon inteon commented Feb 9, 2026

Created a module for the sigs.k8s.io/kube-api-linter linter.

first version, still wip

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@inteon inteon requested a review from erikgb February 9, 2026 14:06
@cert-manager-prow cert-manager-prow bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Feb 9, 2026
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshvanl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 9, 2026
## Verify all APIs using Kube API Linter
## @category [shared] Generate/ Verify
verify-kube-api-lint: | $(NEEDS_GO) $(NEEDS_GOLANGCI-LINT-KUBE) $(bin_dir)/scratch
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need to find/loop here? The API types will typically reside in one Go module.

## Fix all APIs using Kube API Linter
## @category [shared] Generate/ Verify
fix-kube-api-lint: | $(NEEDS_GO) $(NEEDS_GOLANGCI-LINT-KUBE) $(bin_dir)/scratch
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
Copy link
Member

Choose a reason for hiding this comment

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

Same as above, to reduce complexity.

golangci_lint_version := v2.8.0
# https://pkg.go.dev/sigs.k8s.io/kube-api-linter?tab=versions
# renovate: datasource=go packageName=sigs.k8s.io/kube-api-linter
golangci_lint_kube_version := v0.0.0-20260114104534-18147eee9c49
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't kube_api_linter_version be a better name for this variable? (And the same for similar/deduced variables)

@cert-manager-prow cert-manager-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 11, 2026
@cert-manager-prow
Copy link
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants