From 83a0138172e22f5efb7d9852b3ed0fb5fc8117b2 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 14 Mar 2026 09:16:26 +0100 Subject: [PATCH] chore: fix deprecatedComment issues from gocritic Signed-off-by: Matthieu MOREL --- .golangci.yml | 43 ++++++++++++++++++++++++++++++ internal/chart/v3/chart.go | 1 + internal/plugin/metadata_legacy.go | 6 +++-- pkg/chart/v2/chart.go | 1 + 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 536b4b212..ccd721a00 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,6 +22,7 @@ linters: - depguard - dupl - exhaustive + - gocritic - gomodguard - govet - ineffassign @@ -66,6 +67,48 @@ linters: exhaustive: default-signifies-exhaustive: true + gocritic: + disabled-checks: + - appendAssign + - appendCombine + - assignOp + - badCall + - commentedOutCode + - commentFormatting + - deferInLoop + - elseif + - emptyStringTest + - exposedSyncMutex + - filepathJoin + - httpNoBody + - hugeParam + - ifElseChain + - importShadow + - nestingReduce + - nilValReturn + - octalLiteral + - paramTypeCombine + - preferStringWriter + - ptrToRefParam + - rangeValCopy + - regexpSimplify + - singleCaseSwitch + - sloppyReassign + - sloppyLen + - sprintfQuotedString + - stringConcatSimplify + - stringsCompare + - stringXbytes + - todoCommentWithoutDetail + - tooManyResultsChecker + - typeAssertChain + - uncheckedInlineErr + - unnamedResult + - unnecessaryDefer + - unslice + - whyNoLint + enable-all: true + gomodguard: blocked: modules: diff --git a/internal/chart/v3/chart.go b/internal/chart/v3/chart.go index d76a5688c..71a90c855 100644 --- a/internal/chart/v3/chart.go +++ b/internal/chart/v3/chart.go @@ -140,6 +140,7 @@ func (ch *Chart) AppVersion() string { } // CRDs returns a list of File objects in the 'crds/' directory of a Helm chart. +// // Deprecated: use CRDObjects() func (ch *Chart) CRDs() []*common.File { files := []*common.File{} diff --git a/internal/plugin/metadata_legacy.go b/internal/plugin/metadata_legacy.go index b5849edeb..47db9fe7f 100644 --- a/internal/plugin/metadata_legacy.go +++ b/internal/plugin/metadata_legacy.go @@ -50,7 +50,8 @@ type MetadataLegacy struct { PlatformCommand []PlatformCommand `yaml:"platformCommand"` // Command is the plugin command, as a single string. - // DEPRECATED: Use PlatformCommand instead. Removed in subprocess/v1 plugins. + // + // Deprecated: Use PlatformCommand instead. Removed in subprocess/v1 plugins. Command string `yaml:"command"` // IgnoreFlags ignores any flags passed in from Helm @@ -60,7 +61,8 @@ type MetadataLegacy struct { PlatformHooks PlatformHooks `yaml:"platformHooks"` // Hooks are commands that will run on plugin events, as a single string. - // DEPRECATED: Use PlatformHooks instead. Removed in subprocess/v1 plugins. + // + // Deprecated: Use PlatformHooks instead. Removed in subprocess/v1 plugins. Hooks Hooks `yaml:"hooks"` // Downloaders field is used if the plugin supply downloader mechanism diff --git a/pkg/chart/v2/chart.go b/pkg/chart/v2/chart.go index 4cfc2b890..9d798b4de 100644 --- a/pkg/chart/v2/chart.go +++ b/pkg/chart/v2/chart.go @@ -143,6 +143,7 @@ func (ch *Chart) AppVersion() string { } // CRDs returns a list of File objects in the 'crds/' directory of a Helm chart. +// // Deprecated: use CRDObjects() func (ch *Chart) CRDs() []*common.File { files := []*common.File{}