-
Notifications
You must be signed in to change notification settings - Fork 195
Open
Description
Enable kube-api-linter module in golangci-lint to enforce Kubernetes API conventions and best practices.
Motivation
The kube-api-linter is an official linter from kubernetes-sigs that checks Kubernetes API types for common mistakes and enforces best practices based on the Kubernetes API
Conventions.
Currently, this project uses golangci-lint v2.4.0 but only has the default linters enabled (errcheck, govet, ineffassign, staticcheck, unused).
Proposed Changes
- Create
.custom-gcl.ymlto configure the kube-api-linter module:
version: v2.5.0
name: golangci-lint-kube-api-linter
destination: ./bin
plugins:
- module: 'sigs.k8s.io/kube-api-linter'
version: 'v0.0.0-20251029102002-9992248f8813'- Create .golangci.yml to enable the linter:
linters-settings:
custom:
kubeapilinter:
type: "module"
description: "Kube API Linter lints Kube like APIs based on API conventions and best practices"
linters:
enable:
- kubeapilinter
- Update CI workflow if necessary
References
Metadata
Metadata
Assignees
Labels
No labels