mirror of https://github.com/databricks/cli.git
Add MarkFlagRequired to exceptions
This commit is contained in:
parent
09a2a408b9
commit
883a1c3b11
|
@ -18,8 +18,9 @@ linters-settings:
|
||||||
replacement: 'any'
|
replacement: 'any'
|
||||||
errcheck:
|
errcheck:
|
||||||
exclude-functions:
|
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).RegisterFlagCompletionFunc
|
||||||
|
- (*github.com/spf13/cobra.Command).MarkFlagRequired
|
||||||
|
- (*github.com/spf13/pflag.FlagSet).MarkDeprecated
|
||||||
|
- (*github.com/spf13/pflag.FlagSet).MarkHidden
|
||||||
issues:
|
issues:
|
||||||
exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/
|
exclude-dirs-use-default: false # recommended by docs https://golangci-lint.run/usage/false-positives/
|
||||||
|
|
|
@ -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.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()
|
wd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -30,7 +30,7 @@ func NewGeneratePipelineCommand() *cobra.Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.Flags().StringVar(&pipelineId, "existing-pipeline-id", "", `ID of the pipeline to generate config for`)
|
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()
|
wd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue