hadolint 2.2.0 → 2.3.0
raw patch · 7 files changed
+12/−12 lines, 7 filesdep ~language-dockerPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: language-docker
API changes (from Hackage documentation)
Files
- hadolint.cabal +5/−5
- src/Hadolint/Rule/DL3010.hs +1/−1
- src/Hadolint/Rule/DL3020.hs +1/−1
- src/Hadolint/Rule/DL3021.hs +1/−1
- src/Hadolint/Rule/DL3022.hs +1/−1
- src/Hadolint/Rule/DL3023.hs +1/−1
- src/Hadolint/Rule/DL3045.hs +2/−2
hadolint.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 391fff086908037463e385c3450cb46068242dcf3932fbfbb995f2bf9ee6a98c+-- hash: 76044842a02febfc721b4776d4e4bbfdb11c9327f25de10eca894d0d19c1af6b name: hadolint-version: 2.2.0+version: 2.3.0 synopsis: Dockerfile Linter JavaScript API description: A smarter Dockerfile linter that helps you build best practice Docker images. category: Development@@ -137,7 +137,7 @@ , filepath , foldl , ilist- , language-docker >=9.2.0 && <10+ , language-docker >=9.3.0 && <10 , megaparsec >=9.0.0 , mtl , network-uri@@ -165,7 +165,7 @@ , containers , gitrev >=1.3.1 , hadolint- , language-docker >=9.2.0 && <10+ , language-docker >=9.3.0 && <10 , megaparsec >=9.0.0 , optparse-applicative >=0.14.0 , text@@ -264,7 +264,7 @@ , foldl , hadolint , hspec- , language-docker >=9.2.0 && <10+ , language-docker >=9.3.0 && <10 , megaparsec >=9.0.0 , split >=0.2 , text
src/Hadolint/Rule/DL3010.hs view
@@ -11,7 +11,7 @@ code = "DL3010" severity = DLInfoC message = "Use ADD for extracting archives into an image"- check (Copy (CopyArgs srcs _ _ _)) =+ check (Copy (CopyArgs srcs _ _ _ _)) = and [ not (format `Text.isSuffixOf` src) | SourcePath src <- toList srcs,
src/Hadolint/Rule/DL3020.hs view
@@ -12,7 +12,7 @@ severity = DLErrorC message = "Use COPY instead of ADD for files and folders" - check (Add (AddArgs srcs _ _)) =+ check (Add (AddArgs srcs _ _ _)) = and [isArchive src || isUrl src | SourcePath src <- toList srcs] check _ = True {-# INLINEABLE rule #-}
src/Hadolint/Rule/DL3021.hs view
@@ -11,7 +11,7 @@ severity = DLErrorC message = "COPY with more than 2 arguments requires the last argument to end with /" - check (Copy (CopyArgs sources t _ _))+ check (Copy (CopyArgs sources t _ _ _)) | length sources > 1 = endsWithSlash t | otherwise = True check _ = True
src/Hadolint/Rule/DL3022.hs view
@@ -12,7 +12,7 @@ message = "COPY --from should reference a previously defined FROM alias" check _ st (From BaseImage {alias = Just (ImageAlias als)}) = st |> modify (Set.insert als)- check line st (Copy (CopyArgs _ _ _ (CopySource s)))+ check line st (Copy (CopyArgs _ _ _ _ (CopySource s))) | Set.member s (state st) = st | otherwise = st |> addFail CheckFailure {..} check _ st _ = st
src/Hadolint/Rule/DL3023.hs view
@@ -11,7 +11,7 @@ message = "COPY --from should reference a previously defined FROM alias" check _ st f@(From _) = st |> replaceWith (Just f) -- Remember the last FROM instruction found- check line st@(State _ (Just fromInstr)) (Copy (CopyArgs _ _ _ (CopySource stageName)))+ check line st@(State _ (Just fromInstr)) (Copy (CopyArgs _ _ _ _ (CopySource stageName))) | aliasMustBe (/= stageName) fromInstr = st | otherwise = st |> addFail CheckFailure {..} -- cannot copy from the same stage!
src/Hadolint/Rule/DL3045.hs view
@@ -32,7 +32,7 @@ check _ st (From from) = st |> modify (rememberStage from) check _ st (Workdir _) = st |> modify rememberWorkdir- check line st (Copy (CopyArgs _ (TargetPath dest) _ _))+ check line st (Copy (CopyArgs _ (TargetPath dest) _ _ _)) | Acc s m <- state st, Just True <- Map.lookup s m = st -- workdir has been set | "/" `Text.isPrefixOf` Text.dropAround quotePredicate dest = st -- absolute dest. normal | isWindowsAbsolute (Text.dropAround quotePredicate dest) = st -- absolute dest. windows@@ -57,7 +57,7 @@ { current = Stage {stage = unImageAlias als}, workdirSet = let parentValue =- Map.lookup (Stage { stage = imageName image}) workdirSet+ Map.lookup (Stage {stage = imageName image}) workdirSet |> fromMaybe False in workdirSet |> Map.insert (Stage {stage = unImageAlias als}) parentValue