Skip to content

Commit

Permalink
fix for spectral CLI options
Browse files Browse the repository at this point in the history
  • Loading branch information
GGabriele committed Aug 23, 2023
1 parent 8dba700 commit 51e9292
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/file_lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,19 @@ func newLintCmd() *cobra.Command {
"Ruleset to apply to the state file.")
lintCmd.Flags().StringVar(
&cmdLintFormat, "format", plainTextFormat,
fmt.Sprintf("output format: %s, %s or %s ",
fmt.Sprintf(`output format [choices: "%s", "%s", "%s"]`,
plainTextFormat,
string(filebasics.OutputFormatJSON),
string(filebasics.OutputFormatYaml),
),
)
lintCmd.Flags().StringVar(&cmdLintFailSeverity, "fail-severity", "warn", "minimum severity to fail on")
lintCmd.Flags().StringVarP(
&cmdLintFailSeverity, "fail-severity", "F", "error",
"results of this level or above will trigger a failure exit code "+
"[choices: \"error\", \"warn\", \"info\", \"hint\"]")
lintCmd.Flags().BoolVarP(&cmdLintOnlyFailures,
"display-only-failures", "D", false, "only output results equal to or greater than --fail-severity")
"display-only-failures", "D", false,
"only output results equal to or greater than --fail-severity")

return lintCmd
}

0 comments on commit 51e9292

Please sign in to comment.