mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 01:28:34 +08:00
SQUASH: --severity specifies *minimum* severity to be handled
Signed-off-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
committed by
Vidar Holen
parent
b16da4b242
commit
3fe11927bb
@@ -68,7 +68,7 @@ data Options = Options {
|
||||
checkSpec :: CheckSpec,
|
||||
externalSources :: Bool,
|
||||
formatterOptions :: FormatterOptions,
|
||||
maxSeverity :: Severity
|
||||
minSeverity :: Severity
|
||||
}
|
||||
|
||||
defaultOptions = Options {
|
||||
@@ -77,7 +77,7 @@ defaultOptions = Options {
|
||||
formatterOptions = FormatterOptions {
|
||||
foColorOption = ColorAuto
|
||||
},
|
||||
maxSeverity = StyleC
|
||||
minSeverity = StyleC
|
||||
}
|
||||
|
||||
usageHeader = "Usage: shellcheck [OPTIONS...] FILES..."
|
||||
@@ -97,7 +97,7 @@ options = [
|
||||
"Specify dialect (sh, bash, dash, ksh)",
|
||||
Option "S" ["severity"]
|
||||
(ReqArg (Flag "severity") "SEVERITY")
|
||||
"Maximum severity of errors to consider (error, warning, info, style)",
|
||||
"Minimum severity of errors to consider (error, warning, info, style)",
|
||||
Option "V" ["version"]
|
||||
(NoArg $ Flag "version" "true") "Print version information",
|
||||
Option "x" ["external-sources"]
|
||||
@@ -282,7 +282,7 @@ parseOption flag options =
|
||||
Flag "severity" severity ->
|
||||
return options {
|
||||
checkSpec = (checkSpec options) {
|
||||
csMaxSeverity = parseSeverityOption severity
|
||||
csMinSeverity = parseSeverityOption severity
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user