Add initial support for --color

This commit is contained in:
David Haguenauer 2015-12-03 11:15:32 -05:00
parent bd359c5c0f
commit a3d4101d6c
4 changed files with 40 additions and 8 deletions

View file

@ -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,