-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (64 loc) · 2.6 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f
.PHONY: help clean fmt lint security spelling clean-fit format-shell format-toml lint-markdown lint-shell lint-workflows lint-yaml security-leaks spelling-add spelling-markdown spelling-sync
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean-git to run git clean"
@echo " format-shell to format shell scripts"
@echo " format-toml to format TOML files"
@echo " lint-markdown to lint Markdown files"
@echo " lint-shell to lint shell scripts"
@echo " lint-workflows to lint GitHub workflows"
@echo " lint-yaml to lint YAML files"
@echo " security-leaks to check for credential leaks"
@echo " spelling-add to add a regex to the ignore patterns"
@echo " spelling-markdown to spellcheck markdown files"
@echo " spelling-sync to synchronize vale packages"
clean: clean-git
fmt: format-shell format-toml
lint: lint-markdown lint-shell lint-workflows lint-yaml
security: security-leaks
spelling: spelling-markdown
clean-git:
@echo "Cleaning git content ..."
@git clean -fd
@echo "Done."
format-shell:
@echo "Checking shell scripts ..."
@poetry run bash -c "pre-commit run format-shell --all-files --verbose"
@echo "Done."
format-toml:
@echo "Checking TOML files ..."
@poetry run bash -c "pre-commit run format-toml --all-files --verbose"
@echo "Done."
lint-markdown:
@echo "Checking Markdown files ..."
@poetry run bash -c "pre-commit run lint-markdown --all-files --verbose"
@echo "Done."
lint-shell:
@echo "Checking shell scripts ..."
@poetry run bash -c "pre-commit run lint-shell --all-files --verbose"
@echo "Done."
lint-workflows:
@echo "Checking workflows ..."
@poetry run bash -c "pre-commit run lint-github-workflow --all-files --verbose"
@poetry run bash -c "pre-commit run lint-github-workflow-header --all-files --verbose"
@echo "Done."
lint-yaml:
@echo "Checking YAML files ..."
@poetry run bash -c "pre-commit run yamllint --all-files --verbose"
@echo "Done."
spelling-add:
@echo "Adding word ..."
@echo "${MAKE_ARGS}" >> ".vale/Vocab/${PROJECT_NAME}/accept.txt"
@sort -u -o ".vale/Vocab/${PROJECT_NAME}/accept.txt" ".vale/Vocab/${PROJECT_NAME}/accept.txt"
security-leaks:
@echo "Checking security ..."
@poetry run bash -c "pre-commit run security-credentials --all-files --verbose"
@echo "Done."
spelling-markdown:
@echo "Checking spelling ..."
@poetry run bash -c "pre-commit run spelling-markdown --all-files --verbose"
@echo "Done."
spelling-sync:
@echo "Synchronizing vale ..."
@poetry run bash -c "pre-commit run --hook-stage manual spelling-vale-sync --all-files --verbose"