hadolint-2.7.0: Dockerfile Linter JavaScript API
Safe HaskellNone
LanguageHaskell2010

Hadolint.Shell

Synopsis

Documentation

data CmdPart Source #

Constructors

CmdPart 

Fields

Instances

Instances details
Eq CmdPart Source # 
Instance details

Defined in Hadolint.Shell

Methods

(==) :: CmdPart -> CmdPart -> Bool

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

Show CmdPart Source # 
Instance details

Defined in Hadolint.Shell

Methods

showsPrec :: Int -> CmdPart -> ShowS

show :: CmdPart -> String

showList :: [CmdPart] -> ShowS

data Command Source #

Constructors

Command 

Fields

Instances

Instances details
Eq Command Source # 
Instance details

Defined in Hadolint.Shell

Methods

(==) :: Command -> Command -> Bool

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

Show Command Source # 
Instance details

Defined in Hadolint.Shell

Methods

showsPrec :: Int -> Command -> ShowS

show :: Command -> String

showList :: [Command] -> ShowS

data ParsedShell Source #

Constructors

ParsedShell 

Fields

data ShellOpts Source #

Constructors

ShellOpts 

Fields

shellcheck :: ShellOpts -> ParsedShell -> [PositionedComment] Source #

findCommandsInResult :: ParseResult -> [Token] Source #

extractTokensWith :: forall a. (Token -> Maybe a) -> ParseResult -> [a] Source #

allCommands :: (Command -> Bool) -> ParsedShell -> Bool Source #

noCommands :: (Command -> Bool) -> ParsedShell -> Bool Source #

anyCommands :: (Command -> Bool) -> ParsedShell -> Bool Source #

cmdHasArgs :: Text -> [Text] -> Command -> Bool Source #

cmdHasPrefixArg :: Text -> Text -> Command -> Bool Source #

getArgs :: Command -> [Text] Source #

hasFlag :: Text -> Command -> Bool Source #

hasAnyFlag :: [Text] -> Command -> Bool Source #

hasArg :: Text -> Command -> Bool Source #

getFlagArg :: Text -> Command -> [Text] Source #

given a flag and a command, return list of arguments for that particulat flag. E.g., if the command is `useradd -u 12345 luser` and this function is called for the command u, it returns ["12345"].

getValueId :: Int -> [CmdPart] -> Int Source #

usingProgram :: Text -> ParsedShell -> Bool Source #

Check if a command contains a program call in the Run instruction