Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/golangcilint/golangci.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ linters:
enable-all: true
nolintlint:
require-specific: true
{{- if .WithControllerGen }}
modernize:
disable:
# omitzero requires removing omitempty tags in kubernetes api struct types which are nested, which is intepreted by controller-gen and breaks the CRDs.
- omitzero
{{- end }}
{{- if .MisspellIgnoreWords }}
misspell:
ignore-rules:
Expand Down
1 change: 1 addition & 0 deletions internal/golangcilint/golangci_lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ func RenderConfig(cfg core.Configuration, sr golang.ScanResult) {
"SkipDirs": cfg.GolangciLint.SkipDirs,
"Timeout": timeout,
"ReviveRules": cfg.GolangciLint.ReviveRules,
"WithControllerGen": cfg.ControllerGen.Enabled.UnwrapOr(sr.KubernetesController),
}))
}
Loading