-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
33 lines (25 loc) · 1.01 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
MINIMAL_INIT=tests/minimal_init.lua
TESTS_DIR=tests
NO_UTIL_SPEC=checks
.PHONY: test
test: ## Run the whole test suite
@nvim \
--headless \
--noplugin \
-u ${MINIMAL_INIT} \
-c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${MINIMAL_INIT}' }"
test-watch: ## Watching for changes to lua files
nodemon -e lua -x "$(MAKE) test || exit 1"
check: ## Run luacheck on the project
luacheck . --globals vim it describe before_each after_each --exclude-files tests/fixtures --max-comment-line-length 140
no-utils: ## Make sure there are no errant utils hanging around
@nvim \
--headless \
--noplugin \
-u ${MINIMAL_INIT} \
-c "PlenaryBustedDirectory ${NO_UTIL_SPEC} { minimal_init = '${MINIMAL_INIT}' }"
pass: test no-utils check ## Run everything, if it's a 0 code, everything's good
help: ## Displays this information.
@printf '%s\n' "Usage: make <command>"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}'
@printf '\n'