module Hadolint.Rule.DL3029 (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 "DL3029" severity :: DLSeverity severity = DLSeverity DLWarningC message :: Text message = Text "Do not use --platform flag with FROM" check :: Instruction args -> Bool check (From BaseImage {$sel:platform:BaseImage :: BaseImage -> Maybe Text platform = Just Text p}) = Text p Text -> Text -> Bool forall a. Eq a => a -> a -> Bool == Text "" check Instruction args _ = Bool True {-# INLINEABLE rule #-}