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