You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way we can keep the {{ if .$file }} under one block instead of sprawled
all over the place. I needed to add the _lint target so we continue to have
`lint` be the default target, this is unfortunate but I think worth it.
Signed-off-by: Manuel Mendez <[email protected]>
Copy file name to clipboardExpand all lines: Makefile.tmpl
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
# BEGIN: lint-install {{.Args}}
3
3
# http://github.com/tinkerbell/lint-install
4
4
5
+
.PHONY: lint
6
+
lint: _lint
7
+
5
8
{{ if .Go }}GOLINT_VERSION ?= v1.42.1{{ end }}
6
9
{{ if .Dockerfile}}HADOLINT_VERSION ?= v2.7.0{{ end }}
7
10
{{ if .Shell}}SHELLCHECK_VERSION ?= v0.7.2{{ end }}
@@ -21,16 +24,6 @@ endif
21
24
{{ if .Go }}GOLINT_CONFIG = $(LINT_ROOT)/.golangci.yml{{ end }}
22
25
{{ if .YAML }}YAMLLINT_ROOT = out/linters/yamllint-$(YAMLLINT_VERSION){{ end }}
23
26
24
-
.PHONY: lint
25
-
lint: {{ if .Shell }}out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck {{ end }}{{ if .Dockerfile }}out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) {{ end }}{{ if .Go}}out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH) {{ end }}{{ if .YAML}}$(YAMLLINT_ROOT)/dist/bin/yamllint{{ end }}
26
-
{{- range .LintCommands }}
27
-
{{ .}}{{ end}}
28
-
29
-
.PHONY: fix
30
-
fix: {{ if .Shell }}out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck {{ end }}{{ if .Go}}out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH){{ end }}
_lint: {{ if .Shell }}out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck {{ end }}{{ if .Dockerfile }}out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH) {{ end }}{{ if .Go}}out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH) {{ end }}{{ if .YAML}}$(YAMLLINT_ROOT)/dist/bin/yamllint{{ end }}
62
+
{{- range .LintCommands }}
63
+
{{ .}}{{ end}}
64
+
65
+
.PHONY: fix
66
+
fix: {{ if .Shell }}out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck {{ end }}{{ if .Go}}out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH){{ end }}
0 commit comments