Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions shellcheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ data Options = Options {
externalSources :: Bool,
sourcePaths :: [FilePath],
formatterOptions :: FormatterOptions,
minSeverity :: Severity
minSeverity :: Severity,
verbose :: Bool
}

defaultOptions = Options {
Expand All @@ -84,7 +85,8 @@ defaultOptions = Options {
formatterOptions = newFormatterOptions {
foColorOption = ColorAuto
},
minSeverity = StyleC
minSeverity = StyleC,
verbose = False
}

usageHeader = "Usage: shellcheck [OPTIONS...] FILES..."
Expand Down Expand Up @@ -117,6 +119,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"]
Expand Down Expand Up @@ -304,6 +308,11 @@ parseOption flag options =
}
}

Flag "verbose" _ ->
return options {
verbose = True
}

Flag "version" _ -> do
liftIO printVersion
throwError NoProblems
Expand Down