hadolint 1.16.1 → 1.16.2
raw patch · 3 files changed
+9/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- hadolint.cabal +2/−2
- src/Hadolint/Rules.hs +4/−2
- test/Spec.hs +3/−0
hadolint.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 450fbbc893f6ece618b57a9693451fcde7e0a9421d0fdf71f2adef88f01cd080+-- hash: 800193e1de2d9afec372837cb353b56d01ef1c3d317521fa05f8231a348446ce name: hadolint-version: 1.16.1+version: 1.16.2 synopsis: Dockerfile Linter JavaScript API description: A smarter Dockerfile linter that helps you build best practice Docker images. category: Development
src/Hadolint/Rules.hs view
@@ -652,9 +652,11 @@ message = "Avoid additional packages by specifying `--no-install-recommends`" check (Run args) = argumentsRule (Shell.noCommands forgotNoInstallRecommends) args check _ = True- forgotNoInstallRecommends cmd = isAptGetInstall cmd && not (hasRecommendsOption cmd)+ forgotNoInstallRecommends cmd = isAptGetInstall cmd && not (disablesRecommendOption cmd) isAptGetInstall = Shell.cmdHasArgs "apt-get" ["install"]- hasRecommendsOption = Shell.hasFlag "no-install-recommends"+ disablesRecommendOption cmd =+ Shell.hasFlag "no-install-recommends" cmd ||+ "APT::Install-Recommends=false" `elem` Shell.getAllArgs cmd isArchive :: Text.Text -> Bool isArchive path =
test/Spec.hs view
@@ -672,6 +672,9 @@ it "apt-get no install recommends" $ do ruleCatches aptGetNoRecommends "RUN apt-get -y install python" onBuildRuleCatches aptGetNoRecommends "RUN apt-get -y install python"+ it "apt-get no install recommends via option" $ do+ ruleCatchesNot aptGetNoRecommends "RUN apt-get -o APT::Install-Recommends=false install python"+ onBuildRuleCatchesNot aptGetNoRecommends "RUN apt-get -o APT::Install-Recommends=false install python" it "apt-get version" $ do ruleCatchesNot aptGetVersionPinned "RUN apt-get install -y python=1.2.2" onBuildRuleCatchesNot aptGetVersionPinned "RUN apt-get install -y python=1.2.2"