Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Metadata = Metadata {}
- data RuleCheck = RuleCheck {
- metadata :: Metadata
- filename :: Filename
- linenumber :: Linenumber
- success :: Bool
- type IgnoreRuleParser = Parsec Void Text
- type ParsedFile = [InstructionPos ParsedBash]
- link :: Metadata -> Text
- type Rule = ParsedFile -> [RuleCheck]
- mapInstructions :: Metadata -> (state -> Linenumber -> Instruction ParsedBash -> (state, Bool)) -> state -> Rule
- instructionRule :: Text -> Severity -> Text -> (Instruction ParsedBash -> Bool) -> Rule
- instructionRuleLine :: Text -> Severity -> Text -> (Linenumber -> Instruction ParsedBash -> Bool) -> Rule
- instructionRuleState :: Text -> Severity -> Text -> (state -> Linenumber -> Instruction ParsedBash -> (state, Bool)) -> state -> Rule
- withState :: a -> b -> (a, b)
- argumentsRule :: (ParsedBash -> a) -> Arguments ParsedBash -> a
- analyze :: [Rule] -> Dockerfile -> [RuleCheck]
- ignored :: Dockerfile -> [(Linenumber, [Text])]
- rules :: [Rule]
- commentMetadata :: Comment -> Metadata
- shellcheckBash :: ParsedFile -> [RuleCheck]
- allFromImages :: ParsedFile -> [(Linenumber, BaseImage)]
- allAliasedImages :: ParsedFile -> [(Linenumber, ImageAlias)]
- allImageNames :: ParsedFile -> [(Linenumber, Text)]
- previouslyDefinedAliases :: Linenumber -> ParsedFile -> [Text]
- aliasMustBe :: (Text -> Bool) -> Instruction a -> Bool
- fromName :: BaseImage -> Text
- fromAlias :: BaseImage -> Maybe ImageAlias
- absoluteWorkdir :: Rule
- hasNoMaintainer :: Rule
- usingProgram :: String -> ParsedBash -> Bool
- multipleCmds :: Rule
- multipleEntrypoints :: Rule
- wgetOrCurl :: Rule
- invalidCmd :: Rule
- noRootUser :: Rule
- noCd :: Rule
- noSudo :: Rule
- noAptGetUpgrade :: Rule
- noUntagged :: Rule
- noLatestTag :: Rule
- aptGetVersionPinned :: Rule
- aptGetPackages :: ParsedBash -> [String]
- aptGetCleanup :: Rule
- noApkUpgrade :: Rule
- apkAddVersionPinned :: Rule
- apkAddPackages :: ParsedBash -> [String]
- apkAddNoCache :: Rule
- useAdd :: Rule
- invalidPort :: Rule
- pipVersionPinned :: Rule
- stripInstallPrefix :: [String] -> [String]
- npmVersionPinned :: Rule
- aptGetYes :: Rule
- aptGetNoRecommends :: Rule
- isArchive :: Text -> Bool
- isUrl :: Text -> Bool
- copyInsteadAdd :: Rule
- copyEndingSlash :: Rule
- copyFromExists :: Rule
- copyFromAnother :: Rule
- fromAliasUnique :: Rule
- useShell :: Rule
Documentation
RuleCheck | |
|
type ParsedFile = [InstructionPos ParsedBash] Source #
type Rule = ParsedFile -> [RuleCheck] Source #
mapInstructions :: Metadata -> (state -> Linenumber -> Instruction ParsedBash -> (state, Bool)) -> state -> Rule Source #
instructionRule :: Text -> Severity -> Text -> (Instruction ParsedBash -> Bool) -> Rule Source #
instructionRuleLine :: Text -> Severity -> Text -> (Linenumber -> Instruction ParsedBash -> Bool) -> Rule Source #
instructionRuleState :: Text -> Severity -> Text -> (state -> Linenumber -> Instruction ParsedBash -> (state, Bool)) -> state -> Rule Source #
argumentsRule :: (ParsedBash -> a) -> Arguments ParsedBash -> a Source #
ignored :: Dockerfile -> [(Linenumber, [Text])] Source #
commentMetadata :: Comment -> Metadata Source #
shellcheckBash :: ParsedFile -> [RuleCheck] Source #
allFromImages :: ParsedFile -> [(Linenumber, BaseImage)] Source #
allAliasedImages :: ParsedFile -> [(Linenumber, ImageAlias)] Source #
allImageNames :: ParsedFile -> [(Linenumber, Text)] 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.
usingProgram :: String -> ParsedBash -> Bool Source #
multipleCmds :: Rule Source #
wgetOrCurl :: Rule Source #
invalidCmd :: Rule Source #
noRootUser :: Rule Source #
noUntagged :: Rule Source #
noLatestTag :: Rule Source #
aptGetPackages :: ParsedBash -> [String] Source #
aptGetCleanup :: Rule Source #
noApkUpgrade :: Rule Source #
apkAddPackages :: ParsedBash -> [String] Source #
apkAddNoCache :: Rule Source #
invalidPort :: Rule Source #
stripInstallPrefix :: [String] -> [String] Source #
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]