-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 778 Bytes
/
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
# To run a single test: `make test/1.test`
# To run all tests: `make test`
MAKEFLAGS += -k # keep running on failure
MAKEFLAGS += -j1 # explicitly run on a single thread,
# more would cause problems on coverage report merging
SHELL := /bin/sh
all_lint_formats := $(addsuffix .lint, sh dash bash ksh)
.PHONY: lint %.lint clean
list_all_lint_formats:
@echo $(all_lint_formats)
%.lint:
@git ls-tree -r master --name-only | \
grep -e '\.sh$$' -e '\.bash$$' -e '\.ksh$$' -e '\.bashrc$$' -e \
'\.bash_profile$$' -e '\.bash_login$$' -e '\.bash_logout$$' | \
xargs shellcheck && \
echo "Lint $(basename $@) successful" || \
echo "Lint $@ failed"
lint_all: $(all_lint_formats)
lint: lint_all
@echo "Success, all lints passed."
clean:
@echo "Clean"
rm -f .tarhash