hadolint-1.17.2: Dockerfile Linter JavaScript API

Safe HaskellNone
LanguageHaskell2010

Hadolint.Rules

Synopsis

Documentation

data Metadata Source #

Constructors

Metadata 

Fields

Instances
Eq Metadata Source # 
Instance details

Defined in Hadolint.Rules

newtype RulesConfig Source #

Contains the required parameters for optional rules

Constructors

RulesConfig 

Fields

type SimpleCheckerWithState state = state -> Linenumber -> Instruction ParsedShell -> (state, Bool) Source #

A function to check individual dockerfile instructions. It gets the current state and a line number. It should return the new state and whether or not the check passes for the given instruction.

type SimpleCheckerWithLine = Linenumber -> Instruction ParsedShell -> Bool Source #

A function to check individual dockerfile instructions. It gets the current line number. It should return True if the check passes for the given instruction.

type CheckerWithState state = state -> Linenumber -> Instruction ParsedShell -> (state, [Metadata]) Source #

A function to check individual dockerfile instructions. It should return the new state and a list of Metadata records. Each Metadata record signifies a failing check for the given instruction.

withState :: a -> b -> (a, b) Source #

previouslyDefinedAliases :: Linenumber -> ParsedFile -> [Text] Source #

Returns a list of all image aliases in FROM instructions that are defined before the given line number.

aliasMustBe :: (Text -> Bool) -> Instruction a -> Bool Source #

Returns the result of running the check function on the image alias name, if the passed instruction is a FROM instruction with a stage alias. Otherwise, returns True.

commentMetadata :: PositionedComment -> Metadata Source #

Converts ShellCheck errors into our own errors type

npmVersionPinned :: Rule Source #

Rule for pinning NPM packages to version, tag, or commit supported formats by Hadolint npm install (with no args, in package dir) npm install [@scope/]name npm install [@scope/]nametag npm install [<scope>/]name@version npm install git[+http|+https]:/git-hostgit-user/repo-name[semver:semver] npm install git+ssh:/git-host:git-userrepo-name[semver:semver]