ShellCheck-0.4.7: Shell script analysis tool

Safe Haskell | None
Language | Haskell98

ShellCheck.Interface

# Documentation

newtype SystemInterface m #

Constructors

SystemInterface |
Fields siReadFile :: String -> m (Either ErrorMessage String)

data CheckSpec #

Constructors

CheckSpec |
Fields csFilename :: String csScript :: String csCheckSourced :: Bool csExcludedWarnings :: [Integer] csShellTypeOverride :: Maybe Shell

Instances

Eq CheckSpec # |
Methods (==) :: CheckSpec -> CheckSpec -> Bool # (/=) :: CheckSpec -> CheckSpec -> Bool #
Show CheckSpec # |
Methods showsPrec :: Int -> CheckSpec -> ShowS # show :: CheckSpec -> String # showList :: [CheckSpec] -> ShowS #

data CheckResult #

Constructors

CheckResult |
Fields crFilename :: String crComments :: [PositionedComment]

Instances

Eq CheckResult # |
Methods (==) :: CheckResult -> CheckResult -> Bool # (/=) :: CheckResult -> CheckResult -> Bool #
Show CheckResult # |
Methods showsPrec :: Int -> CheckResult -> ShowS # show :: CheckResult -> String # showList :: [CheckResult] -> ShowS #

emptyCheckSpec :: CheckSpec #

data ParseSpec #

Constructors

ParseSpec |
Fields psFilename :: String psScript :: String psCheckSourced :: Bool

Instances

Eq ParseSpec # |
Methods (==) :: ParseSpec -> ParseSpec -> Bool # (/=) :: ParseSpec -> ParseSpec -> Bool #
Show ParseSpec # |
Methods showsPrec :: Int -> ParseSpec -> ShowS # show :: ParseSpec -> String # showList :: [ParseSpec] -> ShowS #

data ParseResult #

Constructors

ParseResult |
Fields prComments :: [PositionedComment] prTokenPositions :: Map Id Position prRoot :: Maybe Token

Instances

Eq ParseResult # |
Methods (==) :: ParseResult -> ParseResult -> Bool # (/=) :: ParseResult -> ParseResult -> Bool #
Show ParseResult # |
Methods showsPrec :: Int -> ParseResult -> ShowS # show :: ParseResult -> String # showList :: [ParseResult] -> ShowS #

data AnalysisSpec #

Constructors

AnalysisSpec |
Fields asScript :: Token asShellType :: Maybe Shell asExecutionMode :: ExecutionMode asCheckSourced :: Bool

newtype AnalysisResult #

Constructors

AnalysisResult |
Fields arComments :: [TokenComment]

newtype FormatterOptions #

Constructors

FormatterOptions |
Fields foColorOption :: ColorOption

data Shell #

Constructors

Ksh |
Sh |
Bash |
Dash |

Instances

Eq Shell # |
Methods (==) :: Shell -> Shell -> Bool # (/=) :: Shell -> Shell -> Bool #
Show Shell # |
Methods showsPrec :: Int -> Shell -> ShowS # show :: Shell -> String # showList :: [Shell] -> ShowS #

data ExecutionMode #

Constructors

Executed |
Sourced |

Instances

Eq ExecutionMode # |
Methods (==) :: ExecutionMode -> ExecutionMode -> Bool # (/=) :: ExecutionMode -> ExecutionMode -> Bool #
Show ExecutionMode # |
Methods showsPrec :: Int -> ExecutionMode -> ShowS # show :: ExecutionMode -> String # showList :: [ExecutionMode] -> ShowS #

type ErrorMessage = String #

type Code = Integer #

data Severity #

Constructors

ErrorC |
WarningC |
InfoC |
StyleC |

Instances

Eq Severity # |
Methods (==) :: Severity -> Severity -> Bool # (/=) :: Severity -> Severity -> Bool #
Ord Severity # |
Methods compare :: Severity -> Severity -> Ordering # (<) :: Severity -> Severity -> Bool # (<=) :: Severity -> Severity -> Bool # (>) :: Severity -> Severity -> Bool # (>=) :: Severity -> Severity -> Bool # max :: Severity -> Severity -> Severity # min :: Severity -> Severity -> Severity #
Show Severity # |
Methods showsPrec :: Int -> Severity -> ShowS # show :: Severity -> String # showList :: [Severity] -> ShowS #

data Position #

Constructors

Position |
Fields posFile :: String posLine :: Integer posColumn :: Integer

Instances

Eq Position # |
Methods (==) :: Position -> Position -> Bool # (/=) :: Position -> Position -> Bool #
Show Position # |
Methods showsPrec :: Int -> Position -> ShowS # show :: Position -> String # showList :: [Position] -> ShowS #

data Comment #

Constructors

Comment Severity Code String |

Instances

Eq Comment # |
Methods (==) :: Comment -> Comment -> Bool # (/=) :: Comment -> Comment -> Bool #
Show Comment # |
Methods showsPrec :: Int -> Comment -> ShowS # show :: Comment -> String # showList :: [Comment] -> ShowS #

data PositionedComment #

Constructors

PositionedComment Position Position Comment |

Instances

Eq PositionedComment # |
Methods (==) :: PositionedComment -> PositionedComment -> Bool # (/=) :: PositionedComment -> PositionedComment -> Bool #
Show PositionedComment # |
Methods showsPrec :: Int -> PositionedComment -> ShowS # show :: PositionedComment -> String # showList :: [PositionedComment] -> ShowS #

data TokenComment #

Constructors

TokenComment Id Comment |

Instances

Eq TokenComment # |
Methods (==) :: TokenComment -> TokenComment -> Bool # (/=) :: TokenComment -> TokenComment -> Bool #
Show TokenComment # |
Methods showsPrec :: Int -> TokenComment -> ShowS # show :: TokenComment -> String # showList :: [TokenComment] -> ShowS #

data ColorOption #

Constructors

ColorAuto |
ColorAlways |
ColorNever |

Instances

Eq ColorOption # |
Methods (==) :: ColorOption -> ColorOption -> Bool # (/=) :: ColorOption -> ColorOption -> Bool #
Ord ColorOption # |
Methods compare :: ColorOption -> ColorOption -> Ordering # (<) :: ColorOption -> ColorOption -> Bool # (<=) :: ColorOption -> ColorOption -> Bool # (>) :: ColorOption -> ColorOption -> Bool # (>=) :: ColorOption -> ColorOption -> Bool # max :: ColorOption -> ColorOption -> ColorOption # min :: ColorOption -> ColorOption -> ColorOption #
Show ColorOption # |
Methods showsPrec :: Int -> ColorOption -> ShowS # show :: ColorOption -> String # showList :: [ColorOption] -> ShowS #

mockedSystemInterface :: [(String, String)] -> SystemInterface Identity #