hadolint 1.11.0 → 1.11.1
raw patch · 3 files changed
+11/−3 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 +2/−1
- test/Spec.hs +7/−0
hadolint.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a70be00e8bff5c8b285dbd53d25458651c3675620f26bd3419bc6eefad9eb273+-- hash: f8fed6126c23c203348e7319bd1f81b5659ca6256407fd1cb7e5bebc6ecc42a1 name: hadolint-version: 1.11.0+version: 1.11.1 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
@@ -610,8 +610,9 @@ \<package>@<version>`" check (Run args) = argumentsRule (Shell.noCommands forgotToPinVersion) args check _ = True- forgotToPinVersion cmd = isNpmInstall cmd && not (all versionFixed (packages cmd))+ forgotToPinVersion cmd = isNpmInstall cmd && installIsFirst cmd && not (all versionFixed (packages cmd)) isNpmInstall = Shell.cmdHasArgs "npm" ["install"]+ installIsFirst cmd = ["install"] `isPrefixOf` Shell.getArgsNoFlags cmd packages cmd = stripInstallPrefix (Shell.getArgsNoFlags cmd) versionFixed package = if hasGitPrefix package
test/Spec.hs view
@@ -433,6 +433,13 @@ onBuildRuleCatchesNot npmVersionPinned "RUN npm install git://github.com/npm/npm.git#v1.0.27"+ it "npm run install is fine" $ do+ ruleCatchesNot+ npmVersionPinned+ "RUN npm run --crazy install"+ onBuildRuleCatchesNot+ npmVersionPinned+ "RUN npm run --crazy install" --version range is not supported it "version pinned with scope" $ do