-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Dockerfile Linter JavaScript API
--   
--   A smarter Dockerfile linter that helps you build best practice Docker
--   images.
@package hadolint
@version 2.6.1

module Hadolint.Rule
(|>) :: a -> (a -> b) -> b
infixl 0 |>
data DLSeverity
DLErrorC :: DLSeverity
DLWarningC :: DLSeverity
DLInfoC :: DLSeverity
DLStyleC :: DLSeverity
DLIgnoreC :: DLSeverity
withSeverity :: (DLSeverity -> Parser a) -> Node Pos -> Parser a
readSeverity :: Text -> Either Text DLSeverity
newtype RuleCode
RuleCode :: Text -> RuleCode
[unRuleCode] :: RuleCode -> Text
data CheckFailure
CheckFailure :: RuleCode -> DLSeverity -> Text -> Linenumber -> CheckFailure
[code] :: CheckFailure -> RuleCode
[severity] :: CheckFailure -> DLSeverity
[message] :: CheckFailure -> Text
[line] :: CheckFailure -> Linenumber
type Failures = Seq CheckFailure
data State a
State :: Failures -> a -> State a
[failures] :: State a -> Failures
[state] :: State a -> a
type LabelName = Text
data LabelType
RawText :: LabelType
Url :: LabelType
Spdx :: LabelType
GitHash :: LabelType
Rfc3339 :: LabelType
SemVer :: LabelType
Email :: LabelType
read :: Text -> Either Text LabelType
withLabelType :: (LabelType -> Parser a) -> Node Pos -> Parser a
type LabelSchema = Map LabelName LabelType
withLineNumber :: (Linenumber -> t1 -> Instruction args -> t2) -> t1 -> InstructionPos args -> t2
addFail :: CheckFailure -> State a -> State a
emptyState :: a -> State a
simpleState :: State ()
modify :: (a -> a) -> State a -> State a
replaceWith :: a -> State a -> State a
type Rule args = Fold (InstructionPos args) Failures

-- | A simple rule that can be implemented in terms of returning True or
--   False for each instruction If you need to calculate some state to
--   decide upon past information, use <a>customRule</a>
simpleRule :: RuleCode -> DLSeverity -> Text -> (Instruction args -> Bool) -> Rule args

-- | A rule that accumulates a State a. The state contains the collection
--   of failed lines and a custom data type that can be used to track
--   properties for the rule. Each step always returns the new State, which
--   offers the ability to both accumulate properties and mark failures for
--   every given instruction.
customRule :: (Linenumber -> State a -> Instruction args -> State a) -> State a -> Rule args

-- | Similarly to <a>customRule</a>, it returns a State a for each step,
--   but it has the ability to run a done callback as the last step of the
--   rule. The done callback can be used to transform the state and mark
--   failures for any arbitrary line in the input. This helper is meant for
--   rules that need to do lookahead. Instead of looking ahead, the state
--   should store the facts and make a decision about them once the input
--   is finished.
veryCustomRule :: (Linenumber -> State a -> Instruction args -> State a) -> State a -> (State a -> Failures) -> Rule args
foldArguments :: (a -> b) -> Arguments a -> b

-- | 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.
aliasMustBe :: (Text -> Bool) -> Instruction a -> Bool
instance Control.DeepSeq.NFData Hadolint.Rule.DLSeverity
instance GHC.Generics.Generic Hadolint.Rule.DLSeverity
instance GHC.Classes.Ord Hadolint.Rule.DLSeverity
instance GHC.Classes.Eq Hadolint.Rule.DLSeverity
instance GHC.Read.Read Hadolint.Rule.DLSeverity
instance GHC.Show.Show Hadolint.Rule.DLSeverity
instance GHC.Classes.Ord Hadolint.Rule.RuleCode
instance GHC.Classes.Eq Hadolint.Rule.RuleCode
instance GHC.Show.Show Hadolint.Rule.RuleCode
instance GHC.Classes.Eq Hadolint.Rule.CheckFailure
instance GHC.Show.Show Hadolint.Rule.CheckFailure
instance GHC.Show.Show a => GHC.Show.Show (Hadolint.Rule.State a)
instance GHC.Show.Show Hadolint.Rule.LabelType
instance GHC.Read.Read Hadolint.Rule.LabelType
instance GHC.Classes.Eq Hadolint.Rule.LabelType
instance Data.YAML.FromYAML Hadolint.Rule.LabelType
instance GHC.Classes.Ord Hadolint.Rule.CheckFailure
instance Data.String.IsString Hadolint.Rule.RuleCode
instance Data.YAML.FromYAML Hadolint.Rule.DLSeverity
instance GHC.Base.Semigroup Hadolint.Rule.DLSeverity
instance GHC.Base.Monoid Hadolint.Rule.DLSeverity

module Hadolint.Ignore
ignored :: Fold (InstructionPos Text) (IntMap (Set RuleCode))

module Hadolint.Formatter.Format
severityText :: DLSeverity -> Text
stripNewlines :: String -> String
errorMessage :: (VisualStream s, ShowErrorComponent e) => ParseErrorBundle s e -> String
errorMessageLine :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => ParseErrorBundle s e -> String
errorPosition :: TraversableStream s => ParseErrorBundle s e -> SourcePos
errorPositionPretty :: TraversableStream s => ParseErrorBundle s e -> String
errorBundlePretty :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => ParseErrorBundle s e -> String
data Result s e
Result :: Text -> Seq (ParseErrorBundle s e) -> Failures -> Result s e
[fileName] :: Result s e -> Text
[errors] :: Result s e -> Seq (ParseErrorBundle s e)
[checks] :: Result s e -> Failures
toResult :: Text -> Either (ParseErrorBundle s e) Failures -> Result s e

module Hadolint.Formatter.TTY
printResults :: (VisualStream s, TraversableStream s, ShowErrorComponent e, Foldable f) => f (Result s e) -> Bool -> IO ()
formatCheck :: Bool -> Text -> CheckFailure -> Text
formatError :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => ParseErrorBundle s e -> String

module Hadolint.Formatter.SonarQube
formatResult :: Result s e -> Seq (SonarQubeFormat s e)
printResults :: (VisualStream s, TraversableStream s, ShowErrorComponent e, Foldable f) => f (Result s e) -> IO ()
instance (Text.Megaparsec.Stream.VisualStream s, Text.Megaparsec.Stream.TraversableStream s, Text.Megaparsec.Error.ShowErrorComponent e) => Data.Aeson.Types.ToJSON.ToJSON (Hadolint.Formatter.SonarQube.SonarQubeFormat s e)

module Hadolint.Formatter.Json
printResults :: (VisualStream s, TraversableStream s, ShowErrorComponent e, Foldable f) => f (Result s e) -> IO ()
formatResult :: Result s e -> Seq (JsonFormat s e)
instance (Text.Megaparsec.Stream.VisualStream s, Text.Megaparsec.Stream.TraversableStream s, Text.Megaparsec.Error.ShowErrorComponent e) => Data.Aeson.Types.ToJSON.ToJSON (Hadolint.Formatter.Json.JsonFormat s e)

module Hadolint.Formatter.Codeclimate
printResults :: (VisualStream s, TraversableStream s, ShowErrorComponent e, Foldable f) => f (Result s e) -> IO ()
printGitlabResults :: (Foldable f, VisualStream s, TraversableStream s, ShowErrorComponent e) => f (Result s e) -> IO ()
formatResult :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => Result s e -> Seq Issue
formatGitlabResult :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => Result s e -> Seq FingerprintIssue
instance GHC.Generics.Generic Hadolint.Formatter.Codeclimate.Pos
instance Data.Aeson.Types.ToJSON.ToJSON Hadolint.Formatter.Codeclimate.FingerprintIssue
instance Data.Aeson.Types.ToJSON.ToJSON Hadolint.Formatter.Codeclimate.Issue
instance Data.Aeson.Types.ToJSON.ToJSON Hadolint.Formatter.Codeclimate.Location
instance Data.Aeson.Types.ToJSON.ToJSON Hadolint.Formatter.Codeclimate.Pos

module Hadolint.Formatter.Codacy
printResults :: (Foldable f, VisualStream s, TraversableStream s, ShowErrorComponent e) => f (Result s e) -> IO ()
formatResult :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => Result s e -> Seq Issue
instance Data.Aeson.Types.ToJSON.ToJSON Hadolint.Formatter.Codacy.Issue

module Hadolint.Formatter.Checkstyle
printResults :: (Foldable f, VisualStream s, TraversableStream s, ShowErrorComponent e) => f (Result s e) -> Maybe FilePath -> IO ()
formatResult :: (VisualStream s, TraversableStream s, ShowErrorComponent e) => Result s e -> Maybe FilePath -> Builder

module Hadolint.Rule.DL3000
rule :: Rule args

module Hadolint.Rule.DL3002
rule :: Rule args
instance GHC.Show.Show Hadolint.Rule.DL3002.Acc

module Hadolint.Rule.DL3006
rule :: Rule args

module Hadolint.Rule.DL3007
rule :: Rule args

module Hadolint.Rule.DL3010
rule :: Rule args

module Hadolint.Rule.DL3011
rule :: Rule args

module Hadolint.Rule.DL3012
rule :: Rule args

module Hadolint.Rule.DL3020
rule :: Rule args

module Hadolint.Rule.DL3021
rule :: Rule args

module Hadolint.Rule.DL3022
rule :: Rule args

module Hadolint.Rule.DL3023
rule :: Rule args

module Hadolint.Rule.DL3024
rule :: Rule args

module Hadolint.Rule.DL3025
rule :: Rule args

module Hadolint.Rule.DL3026
rule :: Set Registry -> Rule args

module Hadolint.Rule.DL3029
rule :: Rule args

module Hadolint.Rule.DL3043
rule :: Rule args

module Hadolint.Rule.DL3044
rule :: Rule args

module Hadolint.Rule.DL3045
rule :: Rule args
instance GHC.Classes.Ord Hadolint.Rule.DL3045.Stage
instance GHC.Classes.Eq Hadolint.Rule.DL3045.Stage

module Hadolint.Rule.DL3048
rule :: Rule args

module Hadolint.Rule.DL3049
rule :: LabelSchema -> Rule args
instance GHC.Show.Show Hadolint.Rule.DL3049.StageID
instance GHC.Classes.Ord Hadolint.Rule.DL3049.StageID
instance GHC.Classes.Eq Hadolint.Rule.DL3049.StageID
instance GHC.Show.Show Hadolint.Rule.DL3049.Acc

module Hadolint.Rule.DL3050
rule :: LabelSchema -> Bool -> Rule args

module Hadolint.Rule.DL3051
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3052
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3053
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3054
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3055
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3056
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3057
rule :: Rule args
instance GHC.Classes.Ord Hadolint.Rule.DL3057.StageID
instance GHC.Classes.Eq Hadolint.Rule.DL3057.StageID
instance GHC.Show.Show Hadolint.Rule.DL3057.StageID
instance GHC.Show.Show Hadolint.Rule.DL3057.Acc

module Hadolint.Rule.DL3058
rule :: LabelSchema -> Rule args

module Hadolint.Rule.DL3059
rule :: Rule args
instance GHC.Show.Show Hadolint.Rule.DL3059.Acc
instance GHC.Classes.Eq Hadolint.Rule.DL3059.Acc

module Hadolint.Rule.DL4000
rule :: Rule args

module Hadolint.Rule.DL4003
rule :: Rule args

module Hadolint.Rule.DL4004
rule :: Rule args

module Hadolint.Shell
data CmdPart
CmdPart :: Text -> Int -> CmdPart
[arg] :: CmdPart -> Text
[partId] :: CmdPart -> Int
data Command
Command :: Text -> [CmdPart] -> [CmdPart] -> Command
[name] :: Command -> Text
[arguments] :: Command -> [CmdPart]
[flags] :: Command -> [CmdPart]
data ParsedShell
ParsedShell :: Text -> ParseResult -> [Command] -> ParsedShell
[original] :: ParsedShell -> Text
[parsed] :: ParsedShell -> ParseResult
[presentCommands] :: ParsedShell -> [Command]
data ShellOpts
ShellOpts :: Text -> Set Text -> ShellOpts
[shellName] :: ShellOpts -> Text
[envVars] :: ShellOpts -> Set Text
defaultShellOpts :: ShellOpts
addVars :: [Text] -> ShellOpts -> ShellOpts
setShell :: Text -> ShellOpts -> ShellOpts
shellcheck :: ShellOpts -> ParsedShell -> [PositionedComment]
nonPosixShells :: [Text]
parseShell :: Text -> ParsedShell
findCommandsInResult :: ParseResult -> [Token]
extractTokensWith :: forall a. (Token -> Maybe a) -> ParseResult -> [a]
findPipes :: ParsedShell -> [Token]
hasPipes :: ParsedShell -> Bool
allCommands :: (Command -> Bool) -> ParsedShell -> Bool
noCommands :: (Command -> Bool) -> ParsedShell -> Bool
anyCommands :: (Command -> Bool) -> ParsedShell -> Bool
findCommandNames :: ParsedShell -> [Text]
cmdHasArgs :: Text -> [Text] -> Command -> Bool
cmdHasPrefixArg :: Text -> Text -> Command -> Bool
extractAllArgs :: Token -> [CmdPart]
getArgs :: Command -> [Text]
getAllFlags :: [CmdPart] -> [CmdPart]
getArgsNoFlags :: Command -> [Text]
hasFlag :: Text -> Command -> Bool
hasAnyFlag :: [Text] -> Command -> Bool
hasArg :: Text -> Command -> Bool
dropFlagArg :: [Text] -> Command -> Command

-- | 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 <tt>u</tt>, it returns
--   ["12345"].
getFlagArg :: Text -> Command -> [Text]
getValueId :: Int -> [CmdPart] -> Int

-- | Check if a command contains a program call in the Run instruction
usingProgram :: Text -> ParsedShell -> Bool
isPipInstall :: Command -> Bool
instance GHC.Show.Show Hadolint.Shell.CmdPart
instance GHC.Classes.Eq Hadolint.Shell.CmdPart
instance GHC.Show.Show Hadolint.Shell.Command
instance GHC.Classes.Eq Hadolint.Shell.Command

module Hadolint.Rule.Shellcheck
rule :: Rule ParsedShell

module Hadolint.Rule.DL4006
rule :: Rule ParsedShell

module Hadolint.Rule.DL4005
rule :: Rule ParsedShell

module Hadolint.Rule.DL4001
rule :: Rule ParsedShell

module Hadolint.Rule.DL3060
rule :: Rule ParsedShell
instance GHC.Show.Show Hadolint.Rule.DL3060.Acc

module Hadolint.Rule.DL3047
rule :: Rule ParsedShell

module Hadolint.Rule.DL3046
rule :: Rule ParsedShell

module Hadolint.Rule.DL3042
rule :: Rule ParsedShell
instance GHC.Classes.Ord Hadolint.Rule.DL3042.Stage
instance GHC.Classes.Eq Hadolint.Rule.DL3042.Stage

module Hadolint.Rule.DL3041
rule :: Rule ParsedShell

module Hadolint.Rule.DL3040
rule :: Rule ParsedShell

module Hadolint.Rule.DL3039
rule :: Rule ParsedShell

module Hadolint.Rule.DL3038
rule :: Rule ParsedShell

module Hadolint.Rule.DL3037
rule :: Rule ParsedShell

module Hadolint.Rule.DL3036
rule :: Rule ParsedShell

module Hadolint.Rule.DL3035
rule :: Rule ParsedShell

module Hadolint.Rule.DL3034
rule :: Rule ParsedShell

module Hadolint.Rule.DL3033
rule :: Rule ParsedShell

module Hadolint.Rule.DL3032
rule :: Rule ParsedShell

module Hadolint.Rule.DL3031
rule :: Rule ParsedShell

module Hadolint.Rule.DL3030
rule :: Rule ParsedShell

module Hadolint.Rule.DL3028
rule :: Rule ParsedShell

module Hadolint.Rule.DL3027
rule :: Rule ParsedShell

module Hadolint.Rule.DL3019
rule :: Rule ParsedShell

module Hadolint.Rule.DL3018
rule :: Rule ParsedShell

module Hadolint.Rule.DL3017
rule :: Rule ParsedShell

module Hadolint.Rule.DL3016

-- | Rule for pinning NPM packages to version, tag, or commit supported
--   formats by Hadolint npm install (with no args, in package dir) npm
--   install [<a>@scope</a>/]<a>name</a> npm install
--   [<a>@scope</a>/]<a>name</a><tt><a>tag</a> npm install
--   [&lt;</tt>scope&gt;/]<a>name</a>@<a>version</a> npm install
--   git[+http|+https]:/<i><a>git-host</a></i><a>git-user</a>/<a>repo-name</a>[semver:<a>semver</a>]
--   npm install
--   git+ssh:/<i><a>git-host</a>:<a>git-user</a></i><a>repo-name</a>[semver:<a>semver</a>]
rule :: Rule ParsedShell

module Hadolint.Rule.DL3015
rule :: Rule ParsedShell

module Hadolint.Rule.DL3014
rule :: Rule ParsedShell

module Hadolint.Rule.DL3013
rule :: Rule ParsedShell

module Hadolint.Rule.DL3009
rule :: Rule ParsedShell
instance GHC.Show.Show Hadolint.Rule.DL3009.Acc

module Hadolint.Rule.DL3008
rule :: Rule ParsedShell

module Hadolint.Rule.DL3005
rule :: Rule ParsedShell

module Hadolint.Rule.DL3004
rule :: Rule ParsedShell

module Hadolint.Rule.DL3003
rule :: Rule ParsedShell

module Hadolint.Rule.DL3001
rule :: Rule ParsedShell

module Hadolint.Process
run :: RulesConfig -> [InstructionPos Text] -> Failures

-- | Contains the required parameters for optional rules
data RulesConfig
RulesConfig :: Set Registry -> LabelSchema -> Bool -> RulesConfig

-- | The docker registries that are allowed in FROM
[allowedRegistries] :: RulesConfig -> Set Registry
[labelSchema] :: RulesConfig -> LabelSchema
[strictLabels] :: RulesConfig -> Bool
instance GHC.Classes.Eq Hadolint.Process.RulesConfig
instance GHC.Show.Show Hadolint.Process.RulesConfig
instance GHC.Base.Semigroup Hadolint.Process.RulesConfig
instance GHC.Base.Monoid Hadolint.Process.RulesConfig

module Hadolint.Lint

-- | Performs the process of parsing the dockerfile and analyzing it with
--   all the applicable rules, depending on the list of ignored rules.
lintIO :: LintOptions -> NonEmpty FilePath -> IO (NonEmpty (Result Text DockerfileError))
lint :: LintOptions -> [(Text, Either Error Dockerfile)] -> [Result Text DockerfileError]
analyze :: LintOptions -> Dockerfile -> Seq CheckFailure
data LintOptions
LintOptions :: [ErrorRule] -> [WarningRule] -> [InfoRule] -> [StyleRule] -> [IgnoreRule] -> RulesConfig -> DLSeverity -> LintOptions
[errorRules] :: LintOptions -> [ErrorRule]
[warningRules] :: LintOptions -> [WarningRule]
[infoRules] :: LintOptions -> [InfoRule]
[styleRules] :: LintOptions -> [StyleRule]
[ignoreRules] :: LintOptions -> [IgnoreRule]
[rulesConfig] :: LintOptions -> RulesConfig
[failThreshold] :: LintOptions -> DLSeverity
type ErrorRule = RuleCode
type WarningRule = RuleCode
type InfoRule = RuleCode
type StyleRule = RuleCode
type IgnoreRule = RuleCode
type TrustedRegistry = Text
instance GHC.Show.Show Hadolint.Lint.LintOptions
instance GHC.Base.Semigroup Hadolint.Lint.LintOptions
instance GHC.Base.Monoid Hadolint.Lint.LintOptions

module Hadolint.Config

-- | If both the ignoreRules and rulesConfig properties of Lint options are
--   empty then this function will fill them with the default found in the
--   passed config file. If there is an error parsing the default config
--   file, this function will return the error string.
applyConfig :: Maybe FilePath -> LintOptions -> IO (Either String LintOptions)

-- | Gets the configuration file which Hadolint uses
getConfig :: Maybe FilePath -> IO (Maybe FilePath)
data ConfigFile
ConfigFile :: Maybe OverrideConfig -> Maybe [IgnoreRule] -> Maybe [TrustedRegistry] -> Maybe LabelSchema -> Maybe Bool -> Maybe DLSeverity -> ConfigFile
[overrideRules] :: ConfigFile -> Maybe OverrideConfig
[ignoredRules] :: ConfigFile -> Maybe [IgnoreRule]
[trustedRegistries] :: ConfigFile -> Maybe [TrustedRegistry]
[labelSchemaConfig] :: ConfigFile -> Maybe LabelSchema
[strictLabelSchema] :: ConfigFile -> Maybe Bool
[failureThreshold] :: ConfigFile -> Maybe DLSeverity
data OverrideConfig
OverrideConfig :: Maybe [ErrorRule] -> Maybe [WarningRule] -> Maybe [InfoRule] -> Maybe [StyleRule] -> OverrideConfig
[overrideErrorRules] :: OverrideConfig -> Maybe [ErrorRule]
[overrideWarningRules] :: OverrideConfig -> Maybe [WarningRule]
[overrideInfoRules] :: OverrideConfig -> Maybe [InfoRule]
[overrideStyleRules] :: OverrideConfig -> Maybe [StyleRule]
instance GHC.Generics.Generic Hadolint.Config.OverrideConfig
instance GHC.Classes.Eq Hadolint.Config.OverrideConfig
instance GHC.Show.Show Hadolint.Config.OverrideConfig
instance GHC.Generics.Generic Hadolint.Config.ConfigFile
instance GHC.Classes.Eq Hadolint.Config.ConfigFile
instance GHC.Show.Show Hadolint.Config.ConfigFile
instance Data.YAML.FromYAML Hadolint.Config.ConfigFile
instance GHC.Base.Semigroup Hadolint.Config.OverrideConfig
instance GHC.Base.Monoid Hadolint.Config.OverrideConfig
instance Data.YAML.FromYAML Hadolint.Config.OverrideConfig

module Hadolint
data Result s e
Result :: Text -> Seq (ParseErrorBundle s e) -> Failures -> Result s e
[fileName] :: Result s e -> Text
[errors] :: Result s e -> Seq (ParseErrorBundle s e)
[checks] :: Result s e -> Failures
data OutputFormat
Json :: OutputFormat
SonarQube :: OutputFormat
TTY :: OutputFormat
CodeclimateJson :: OutputFormat
GitlabCodeclimateJson :: OutputFormat
Checkstyle :: OutputFormat
Codacy :: OutputFormat
shallSkipErrorStatus :: OutputFormat -> Bool
printResults :: Foldable f => OutputFormat -> Bool -> Maybe FilePath -> f (Result Text DockerfileError) -> IO ()
instance GHC.Classes.Eq Hadolint.OutputFormat
instance GHC.Show.Show Hadolint.OutputFormat
