mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-16 10:03:08 -07:00
Add initial support for --color
This commit is contained in:
parent
bd359c5c0f
commit
a3d4101d6c
4 changed files with 40 additions and 8 deletions
|
@ -34,21 +34,30 @@ data CheckSpec = CheckSpec {
|
|||
csFilename :: String,
|
||||
csScript :: String,
|
||||
csExcludedWarnings :: [Integer],
|
||||
csColorOption :: ColorOptions,
|
||||
csShellTypeOverride :: Maybe Shell
|
||||
} deriving (Show, Eq)
|
||||
|
||||
data CheckResult = CheckResult {
|
||||
crFilename :: String,
|
||||
crComments :: [PositionedComment]
|
||||
crComments :: [PositionedComment],
|
||||
crColorOption :: ColorOptions
|
||||
} deriving (Show, Eq)
|
||||
|
||||
emptyCheckSpec = CheckSpec {
|
||||
csFilename = "",
|
||||
csScript = "",
|
||||
csExcludedWarnings = [],
|
||||
csShellTypeOverride = Nothing
|
||||
csShellTypeOverride = Nothing,
|
||||
csColorOption = ColorAuto
|
||||
}
|
||||
|
||||
data ColorOptions =
|
||||
ColorAuto
|
||||
| ColorAlways
|
||||
| ColorNever
|
||||
deriving (Ord, Eq, Show)
|
||||
|
||||
-- Parser input and output
|
||||
data ParseSpec = ParseSpec {
|
||||
psFilename :: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue