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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: CheckSpec -> CheckSpec -> Bool # (/=) :: CheckSpec -> CheckSpec -> Bool #
Show CheckSpec # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> CheckSpec -> ShowS # show :: CheckSpec -> String # showList :: [CheckSpec] -> ShowS #

data CheckResult #

Constructors

CheckResult |

Fields

- crFilename :: String
- crComments :: [PositionedComment]

Instances

Eq CheckResult # |
Instance details Defined in ShellCheck.Interface Methods (==) :: CheckResult -> CheckResult -> Bool # (/=) :: CheckResult -> CheckResult -> Bool #
Show CheckResult # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: ParseSpec -> ParseSpec -> Bool # (/=) :: ParseSpec -> ParseSpec -> Bool #
Show ParseSpec # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: ParseResult -> ParseResult -> Bool # (/=) :: ParseResult -> ParseResult -> Bool #
Show ParseResult # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: Shell -> Shell -> Bool # (/=) :: Shell -> Shell -> Bool #
Show Shell # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> Shell -> ShowS # show :: Shell -> String # showList :: [Shell] -> ShowS #

data ExecutionMode #

Constructors

Executed |
Sourced |

Instances

Eq ExecutionMode # |
Instance details Defined in ShellCheck.Interface Methods (==) :: ExecutionMode -> ExecutionMode -> Bool # (/=) :: ExecutionMode -> ExecutionMode -> Bool #
Show ExecutionMode # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: Severity -> Severity -> Bool # (/=) :: Severity -> Severity -> Bool #
Ord Severity # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods (==) :: Position -> Position -> Bool # (/=) :: Position -> Position -> Bool #
Show Position # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> Position -> ShowS # show :: Position -> String # showList :: [Position] -> ShowS #

data Comment #

Constructors

Comment Severity Code String |

Instances

Eq Comment # |
Instance details Defined in ShellCheck.Interface Methods (==) :: Comment -> Comment -> Bool # (/=) :: Comment -> Comment -> Bool #
Show Comment # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> Comment -> ShowS # show :: Comment -> String # showList :: [Comment] -> ShowS #

data PositionedComment #

Constructors

PositionedComment Position Position Comment |

Instances

Eq PositionedComment # |
Instance details Defined in ShellCheck.Interface Methods (==) :: PositionedComment -> PositionedComment -> Bool # (/=) :: PositionedComment -> PositionedComment -> Bool #
Show PositionedComment # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> PositionedComment -> ShowS # show :: PositionedComment -> String # showList :: [PositionedComment] -> ShowS #
JSON PositionedComment # |
Instance details Defined in ShellCheck.Formatter.JSON Methods readJSON :: JSValue -> Result PositionedComment # showJSON :: PositionedComment -> JSValue # readJSONs :: JSValue -> Result [PositionedComment] # showJSONs :: [PositionedComment] -> JSValue #

data TokenComment #

Constructors

TokenComment Id Comment |

Instances

Eq TokenComment # |
Instance details Defined in ShellCheck.Interface Methods (==) :: TokenComment -> TokenComment -> Bool # (/=) :: TokenComment -> TokenComment -> Bool #
Show TokenComment # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> TokenComment -> ShowS # show :: TokenComment -> String # showList :: [TokenComment] -> ShowS #

data ColorOption #

Constructors

ColorAuto |
ColorAlways |
ColorNever |

Instances

Eq ColorOption # |
Instance details Defined in ShellCheck.Interface Methods (==) :: ColorOption -> ColorOption -> Bool # (/=) :: ColorOption -> ColorOption -> Bool #
Ord ColorOption # |
Instance details Defined in ShellCheck.Interface 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 # |
Instance details Defined in ShellCheck.Interface Methods showsPrec :: Int -> ColorOption -> ShowS # show :: ColorOption -> String # showList :: [ColorOption] -> ShowS #

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