diff --git a/.golangci.yaml b/.golangci.yaml index 4165638df..6ab8bb2fe 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -18,8 +18,9 @@ linters-settings: replacement: 'any' errcheck: exclude-functions: - - (*github.com/spf13/pflag.FlagSet).MarkHidden - - (*github.com/spf13/pflag.FlagSet).MarkDeprecated - (*github.com/spf13/cobra.Command).RegisterFlagCompletionFunc + - (*github.com/spf13/cobra.Command).MarkFlagRequired + - (*github.com/spf13/pflag.FlagSet).MarkDeprecated + - (*github.com/spf13/pflag.FlagSet).MarkHidden issues: exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/ diff --git a/cmd/bundle/generate/job.go b/cmd/bundle/generate/job.go index 5ae14ad7d..9ac41e3cb 100644 --- a/cmd/bundle/generate/job.go +++ b/cmd/bundle/generate/job.go @@ -30,7 +30,7 @@ func NewGenerateJobCommand() *cobra.Command { } cmd.Flags().Int64Var(&jobId, "existing-job-id", 0, `Job ID of the job to generate config for`) - _ = cmd.MarkFlagRequired("existing-job-id") + cmd.MarkFlagRequired("existing-job-id") wd, err := os.Getwd() if err != nil { diff --git a/cmd/bundle/generate/pipeline.go b/cmd/bundle/generate/pipeline.go index 1247b77f4..910baa45f 100644 --- a/cmd/bundle/generate/pipeline.go +++ b/cmd/bundle/generate/pipeline.go @@ -30,7 +30,7 @@ func NewGeneratePipelineCommand() *cobra.Command { } cmd.Flags().StringVar(&pipelineId, "existing-pipeline-id", "", `ID of the pipeline to generate config for`) - _ = cmd.MarkFlagRequired("existing-pipeline-id") + cmd.MarkFlagRequired("existing-pipeline-id") wd, err := os.Getwd() if err != nil {