ShellCheck-0.10.0: Shell script analysis tool
Safe HaskellNone
LanguageHaskell98

ShellCheck.AnalyzerLib

Documentation

nullCheck :: b -> RWST Parameters [TokenComment] Cache Identity () Source #

data Checker Source #

Constructors

Checker 

Instances

Instances details
Monoid Checker Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Semigroup Checker Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

(<>) :: Checker -> Checker -> Checker

sconcat :: NonEmpty Checker -> Checker

stimes :: Integral b => b -> Checker -> Checker

composeAnalyzers :: (a -> Analysis) -> (a -> Analysis) -> a -> Analysis Source #

data Parameters Source #

Constructors

Parameters 

Instances

Instances details
Show Parameters Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> Parameters -> ShowS

show :: Parameters -> String

showList :: [Parameters] -> ShowS

data Cache Source #

Constructors

Cache 

data Scope Source #

Constructors

SubshellScope String 
NoneScope 

Instances

Instances details
Show Scope Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> Scope -> ShowS

show :: Scope -> String

showList :: [Scope] -> ShowS

Eq Scope Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

(==) :: Scope -> Scope -> Bool

(/=) :: Scope -> Scope -> Bool

data StackData Source #

Instances

Instances details
Show StackData Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> StackData -> ShowS

show :: StackData -> String

showList :: [StackData] -> ShowS

data DataType Source #

Instances

Instances details
Show DataType Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> DataType -> ShowS

show :: DataType -> String

showList :: [DataType] -> ShowS

data DataSource Source #

Instances

Instances details
Show DataSource Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> DataSource -> ShowS

show :: DataSource -> String

showList :: [DataSource] -> ShowS

data VariableState Source #

Constructors

Dead Token String 
Alive 

Instances

Instances details
Show VariableState Source # 
Instance details

Defined in ShellCheck.AnalyzerLib

Methods

showsPrec :: Int -> VariableState -> ShowS

show :: VariableState -> String

showList :: [VariableState] -> ShowS

producesComments :: Checker -> String -> Maybe Bool Source #

addComment :: (NFData a, MonadWriter [a] m) => a -> m () Source #

warn :: MonadWriter [TokenComment] m => Id -> Code -> String -> m () Source #

err :: MonadWriter [TokenComment] m => Id -> Code -> String -> m () Source #

info :: MonadWriter [TokenComment] m => Id -> Code -> String -> m () Source #

style :: MonadWriter [TokenComment] m => Id -> Code -> String -> m () Source #

errWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m () Source #

warnWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m () Source #

infoWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m () Source #

styleWithFix :: MonadWriter [TokenComment] m => Id -> Code -> String -> Fix -> m () Source #

addCommentWithFix :: MonadWriter [TokenComment] m => Severity -> Id -> Code -> String -> Fix -> m () Source #

containsSetOption :: [Char] -> Token -> Bool Source #

containsShopt :: [Char] -> Token -> Bool Source #

isOptionSet :: [Char] -> Token -> Bool Source #

determineShellTest' :: Maybe Shell -> String -> Shell Source #

isQuoteFree :: Shell -> Map Id Token -> Token -> Bool Source #

isQuoteFreeNode :: Bool -> Shell -> Map Id Token -> Token -> Bool Source #

isParamTo :: Map Id Token -> String -> Token -> Bool Source #

getClosestCommandM :: MonadReader Parameters m => Token -> m (Maybe Token) Source #

getPathM :: MonadReader Parameters m => Token -> m (NonEmpty Token) Source #

isParentOf :: Map Id Token -> Token -> Token -> Bool Source #

parents :: Parameters -> Token -> NonEmpty Token Source #

findFirst :: (a -> Maybe Bool) -> [a] -> Maybe a Source #

isDereferencingBinaryOp :: String -> Bool Source #

isCommand :: Token -> String -> Bool Source #

isUnqualifiedCommand :: Token -> String -> Bool Source #

isCommandMatch :: Token -> (String -> Bool) -> Bool Source #

isConfusedGlobRegex :: String -> Bool Source #

getVariablesFromLiteral :: String -> [String] Source #

whenShell :: (MonadReader Parameters m, Foldable t) => t Shell -> m () -> m () Source #

shouldIgnoreCode :: Parameters -> Integer -> Token -> Bool Source #

modifiesVariable :: Parameters -> Token -> String -> Bool Source #

runTests :: IO Bool Source #