This commit is contained in:
Meisam 2024-01-21 15:29:13 -08:00 committed by GitHub
commit 9141cea729
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,8 @@ data Options = Options {
externalSources :: Bool,
sourcePaths :: [FilePath],
formatterOptions :: FormatterOptions,
minSeverity :: Severity
minSeverity :: Severity,
verbose :: Bool
}
defaultOptions = Options {
@ -86,7 +87,8 @@ defaultOptions = Options {
formatterOptions = newFormatterOptions {
foColorOption = ColorAuto
},
minSeverity = StyleC
minSeverity = StyleC,
verbose = False
}
usageHeader = "Usage: shellcheck [OPTIONS...] FILES..."
@ -119,6 +121,8 @@ options = [
Option "S" ["severity"]
(ReqArg (Flag "severity") "SEVERITY")
"Minimum severity of errors to consider (error, warning, info, style)",
Option "v" ["vebose"]
(NoArg $ Flag "verbose" "true") "Verbose mode",
Option "V" ["version"]
(NoArg $ Flag "version" "true") "Print version information",
Option "W" ["wiki-link-count"]
@ -306,6 +310,11 @@ parseOption flag options =
}
}
Flag "verbose" _ ->
return options {
verbose = True
}
Flag "version" _ -> do
liftIO printVersion
throwError NoProblems