Skip to content

Commit ed17617

Browse files
committed
hadolint: Use --no-fail instead of -t info
Signed-off-by: Thomas Stromberg <[email protected]>
1 parent 43bd10d commit ed17617

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GOLINT_CONFIG:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/.golan
2020

2121
lint: out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH)
2222
out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH) run
23-
out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) -t info $(shell find . -name "*Dockerfile")
23+
out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) $(shell find . -name "*Dockerfile")
2424
out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck $(shell find . -name "*.sh")
2525

2626
out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck:

lint-install.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,12 @@ func shellLintCmd(_ string, level string) string {
204204

205205
// dockerLintCmd returns the appropriate docker lint command for a project.
206206
func dockerLintCmd(_ string, level string) string {
207-
threshold := "info"
207+
f := ""
208208
if level == "warn" {
209-
threshold = "none"
209+
f = " --no-fail"
210210
}
211-
return fmt.Sprintf(`out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) -t %s $(shell find . -name "*Dockerfile")`, threshold)
211+
212+
return fmt.Sprintf(`out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)%s $(shell find . -name "*Dockerfile")`, f)
212213
}
213214

214215
// main creates peanut butter & jelly sandwiches with utmost precision.

0 commit comments

Comments
 (0)