mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 15:27:02 +08:00
Issue 837 flag to include only certain warnings
Issue https://github.com/koalaman/shellcheck/issues/837 Add an --include option, which creates a whitelist of warnings to report on, the opposite of --exclude.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
module ShellCheck.Interface
|
||||
(
|
||||
SystemInterface(..)
|
||||
, CheckSpec(csFilename, csScript, csCheckSourced, csExcludedWarnings, csShellTypeOverride, csMinSeverity)
|
||||
, CheckSpec(csFilename, csScript, csCheckSourced, csIncludedWarnings, csExcludedWarnings, csShellTypeOverride, csMinSeverity)
|
||||
, CheckResult(crFilename, crComments)
|
||||
, ParseSpec(psFilename, psScript, psCheckSourced, psShellTypeOverride)
|
||||
, ParseResult(prComments, prTokenPositions, prRoot)
|
||||
@@ -80,6 +80,7 @@ data CheckSpec = CheckSpec {
|
||||
csScript :: String,
|
||||
csCheckSourced :: Bool,
|
||||
csExcludedWarnings :: [Integer],
|
||||
csIncludedWarnings :: Maybe [Integer],
|
||||
csShellTypeOverride :: Maybe Shell,
|
||||
csMinSeverity :: Severity
|
||||
} deriving (Show, Eq)
|
||||
@@ -101,6 +102,7 @@ emptyCheckSpec = CheckSpec {
|
||||
csScript = "",
|
||||
csCheckSourced = False,
|
||||
csExcludedWarnings = [],
|
||||
csIncludedWarnings = Nothing,
|
||||
csShellTypeOverride = Nothing,
|
||||
csMinSeverity = StyleC
|
||||
}
|
||||
|
Reference in New Issue
Block a user