module Hadolint.Rule.DL3043 (rule) where import Hadolint.Rule import Language.Docker.Syntax rule :: Rule args rule :: Rule args rule = RuleCode -> DLSeverity -> Text -> (Instruction args -> Bool) -> Rule args forall args. RuleCode -> DLSeverity -> Text -> (Instruction args -> Bool) -> Rule args simpleRule RuleCode code DLSeverity severity Text message Instruction args -> Bool forall args. Instruction args -> Bool check where code :: RuleCode code = RuleCode "DL3043" severity :: DLSeverity severity = DLSeverity DLErrorC message :: Text message = Text "`ONBUILD`, `FROM` or `MAINTAINER` triggered from within `ONBUILD` instruction." check :: Instruction args -> Bool check (OnBuild (OnBuild Instruction args _)) = Bool False check (OnBuild (From BaseImage _)) = Bool False check (OnBuild (Maintainer Text _)) = Bool False check Instruction args _ = Bool True {-# INLINEABLE rule #-}