File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,29 @@ help: ## Display help
4
4
@grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5
5
6
6
lint : # # Execute linting
7
+ $(call run_linter,)
8
+
9
+ lint-fix : # # Execute linting and fix
10
+ $(call run_linter, \
11
+ -e FIX_YAML_PRETTIER=true \
12
+ -e FIX_MARKDOWN=true \
13
+ -e FIX_MARKDOWN_PRETTIER=true \
14
+ -e FIX_NATURAL_LANGUAGE=true)
15
+
16
+ define run_linter
7
17
DEFAULT_WORKSPACE="$(CURDIR ) "; \
8
18
LINTER_IMAGE="linter:latest"; \
9
19
VOLUME="$$DEFAULT_WORKSPACE:$$DEFAULT_WORKSPACE"; \
10
- docker build --build-arg UID=$(id -u ) --build-arg GID=$(id -g ) --tag $$ LINTER_IMAGE . ; \
20
+ docker build --build-arg UID=$(id -u ) --build-arg GID=$(id -g ) --tag $$LINTER_IMAGE .; \
11
21
docker run \
12
22
-e DEFAULT_WORKSPACE="$$DEFAULT_WORKSPACE" \
13
23
-e FILTER_REGEX_INCLUDE="$(filter-out $@ ,$(MAKECMDGOALS ) ) " \
24
+ $(1 ) \
14
25
-v $$VOLUME \
15
26
--rm \
16
27
$$LINTER_IMAGE
28
+ endef
29
+
17
30
18
31
# ############################
19
32
# Argument fix workaround
You can’t perform that action at this time.
0 commit comments