Spun out of cert-manager/approver-policy#994 (comment), where @erikgb suggested:
It might be good to align our settings long-term. Maybe we can produce a default KAL config from makefile-modules, as we already do for golangci-lint.
Today each project supplies its own config via kube_api_linter_config:
The golangci-lint precedent to copy: the go module vendors a .golangci.override.yaml inside the klone-synced module directory and merges it over the project's config with yq before running:
|
golangci_lint_override := $(dir $(lastword $(MAKEFILE_LIST)))/.golangci.override.yaml |
|
$(YQ) eval-all -i '. as $$item ireduce ({}; . * $$item)' $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_override) |
The kube-api-linter module could ship a .golangci-kal.override.yaml with the agreed defaults (enable-list, lintersConfig, strict generated exclusions, unlimited issue caps) and merge it the same way, leaving projects a small local file for path scoping and deliberate deviations.
with claude fable-5
Spun out of cert-manager/approver-policy#994 (comment), where @erikgb suggested:
Today each project supplies its own config via
kube_api_linter_config:lintersConfigtweaks: https://github.com/cert-manager/trust-manager/blob/624170596994e291cc433071cd9aaeab88e76564/.golangci-kal.yml#L6-L29pkg/apis.The golangci-lint precedent to copy: the
gomodule vendors a.golangci.override.yamlinside the klone-synced module directory and merges it over the project's config with yq before running:makefile-modules/modules/go/01_mod.mk
Line 27 in 44a7b02
makefile-modules/modules/go/01_mod.mk
Line 119 in 44a7b02
The
kube-api-lintermodule could ship a.golangci-kal.override.yamlwith the agreed defaults (enable-list,lintersConfig, strict generated exclusions, unlimited issue caps) and merge it the same way, leaving projects a small local file for path scoping and deliberate deviations.with claude fable-5