ShellCheck.ASTLib

ShellCheck-0.11.0: Shell script analysis tool

Safe Haskell | None
Language | Haskell98

ShellCheck.ASTLib

# Documentation

arguments :: Token -> [Token] #

isLoop :: Token -> Bool #

willSplit :: Token -> Bool #

isGlob :: Token -> Bool #

isConstant :: Token -> Bool #

isEmpty :: Token -> Bool #

oversimplify :: Token -> [[Char]] #

getFlagsUntil :: ([Char] -> Bool) -> Token -> [(Token, [Char])] #

getAllFlags :: Token -> [(Token, String)] #

getLeadingFlags :: Token -> [(Token, [Char])] #

hasFlag :: Token -> String -> Bool #

isFlag :: Token -> Bool #

isUnquotedFlag :: Token -> Bool #

getGnuOpts :: String -> [Token] -> Maybe [(String, (Token, Token))] #

getBsdOpts :: String -> [Token] -> Maybe [(String, (Token, Token))] #

getOpts :: (Bool, Bool) -> String -> [(String, Bool)] -> [Token] -> Maybe [(String, (Token, Token))] #

getGenericOpts :: [Token] -> [(String, (Token, Token))] #

isArrayExpansion :: Token -> Bool #

mayBecomeMultipleArgs :: Token -> Bool #

willBecomeMultipleArgs :: Token -> Bool #

willConcatInAssignment :: Token -> Bool #

getLiteralString :: Token -> Maybe String #

getLiteralStringDef :: String -> Token -> String #

onlyLiteralString :: Token -> String #

getUnquotedLiteral :: Token -> Maybe [Char] #

isQuotes :: Token -> Bool #

getTrailingUnquotedLiteral :: Token -> Maybe Token #

getLeadingUnquotedString :: Token -> Maybe String #

getGlobOrLiteralString :: Token -> Maybe String #

prop_getLiteralString1 :: Bool #

prop_getLiteralString2 :: Bool #

prop_getLiteralString3 :: Bool #

prop_getLiteralString4 :: Bool #

prop_getLiteralString5 :: Bool #

prop_getLiteralString6 :: Bool #

prop_getLiteralString7 :: Bool #

prop_getLiteralString8 :: Bool #

prop_getLiteralString9 :: Bool #

prop_getLiteralString10 :: Bool #

prop_getLiteralString11 :: Bool #

prop_getLiteralString12 :: Bool #

prop_getLiteralString13 :: Bool #

getLiteralStringExt :: Monad m => (Token -> m String) -> Token -> m String #

isLiteral :: Token -> Bool #

isLiteralNumber :: Token -> Bool #

e4m :: String -> String #

escapeForMessage :: String -> String #

getWordParts :: Token -> [Token] #

braceExpand :: Token -> [Token] #

getCommand :: Token -> Maybe Token #

getCommandName :: Token -> Maybe String #

getCommandArgv :: Token -> Maybe [Token] #

getCommandTokenOrThis :: Token -> Token #

getCommandNameAndToken :: Bool -> Token -> (Maybe String, Token) #

getCommandNameFromExpansion :: Token -> Maybe String #

getCommandBasename :: Token -> Maybe [Char] #

basename :: [Char] -> [Char] #

isAssignment :: Token -> Bool #

isOnlyRedirection :: Token -> Bool #

isFunction :: Token -> Bool #

isFunctionLike :: Token -> Bool #

isBraceExpansion :: Token -> Bool #

getCommandSequences :: Token -> [[Token]] #

getAssociativeArrays :: Token -> [String] #

data PseudoGlob #

Constructors

PGAny |
PGMany |
PGChar Char |

#### Instances

Instances details

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

wordToPseudoGlob :: Token -> [PseudoGlob] #

wordToExactPseudoGlob :: Token -> Maybe [PseudoGlob] #

wordToPseudoGlob' :: Bool -> Token -> Maybe [PseudoGlob] #

simplifyPseudoGlob :: [PseudoGlob] -> [PseudoGlob] #

pseudoGlobsCanOverlap :: [PseudoGlob] -> [PseudoGlob] -> Bool #

pseudoGlobIsSuperSetof :: [PseudoGlob] -> [PseudoGlob] -> Bool #

wordsCanBeEqual :: Token -> Token -> Bool #

isQuoteableExpansion :: Token -> Bool #

isCommandSubstitution :: Token -> Bool #

isStringExpansion :: Token -> Bool #

isAnnotationIgnoringCode :: Integer -> Token -> Bool #

prop_executableFromShebang1 :: Bool #

prop_executableFromShebang2 :: Bool #

prop_executableFromShebang3 :: Bool #

prop_executableFromShebang4 :: Bool #

prop_executableFromShebang5 :: Bool #

prop_executableFromShebang6 :: Bool #

prop_executableFromShebang7 :: Bool #

prop_executableFromShebang8 :: Bool #

prop_executableFromShebang9 :: Bool #

prop_executableFromShebang10 :: Bool #

prop_executableFromShebang11 :: Bool #

executableFromShebang :: String -> String #

isVariableStartChar :: Char -> Bool #

isVariableChar :: Char -> Bool #

isSpecialVariableChar :: Char -> Bool #

variableNameRegex :: Regex #

prop_isVariableName1 :: Bool #

prop_isVariableName2 :: Bool #

prop_isVariableName3 :: Bool #

isVariableName :: [Char] -> Bool #

prop_getBracedReference1 :: Bool #

prop_getBracedReference2 :: Bool #

prop_getBracedReference3 :: Bool #

prop_getBracedReference4 :: Bool #

prop_getBracedReference5 :: Bool #

prop_getBracedReference6 :: Bool #

prop_getBracedReference7 :: Bool #

prop_getBracedReference8 :: Bool #

prop_getBracedReference9 :: Bool #

prop_getBracedReference10 :: Bool #

prop_getBracedReference11 :: Bool #

prop_getBracedReference11b :: Bool #

prop_getBracedReference12 :: Bool #

prop_getBracedReference13 :: Bool #

getBracedReference :: [Char] -> [Char] #

prop_getBracedModifier1 :: Bool #

prop_getBracedModifier2 :: Bool #

prop_getBracedModifier3 :: Bool #

prop_getBracedModifier4 :: Bool #

prop_getBracedModifier5 :: Bool #

getBracedModifier :: [Char] -> String #

prop_getIndexReferences1 :: Bool #

getIndexReferences :: String -> [String] #

prop_getOffsetReferences1 :: Bool #

prop_getOffsetReferences2 :: Bool #

prop_getOffsetReferences3 :: Bool #

prop_getOffsetReferences4 :: Bool #

getOffsetReferences :: String -> [String] #

isUnmodifiedParameterExpansion :: Token -> Bool #

getUnmodifiedParameterExpansion :: Token -> Maybe [Char] #

getPath :: Map Id Token -> Token -> NonEmpty Token #

isClosingFileOp :: Token -> Bool #

getEnableDirectives :: Token -> [String] #

getExtendedAnalysisDirective :: Token -> Maybe Bool #

runTests :: IO Bool #