Skip to content

Commit 9b95d88

Browse files
committed
Update Makefile with goodness from Treewalker
1 parent 00f6d0c commit 9b95d88

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ MINIMAL_INIT=tests/minimal_init.lua
22
TESTS_DIR=tests
33
NO_UTIL_SPEC=checks
44

5-
.PHONY: test
5+
.PHONY: test test-watch check no-utils pass help
66

77
test: ## Run the whole test suite
88
@nvim \
99
--headless \
1010
--noplugin \
1111
-u ${MINIMAL_INIT} \
12-
-c "PlenaryBustedDirectory ${TESTS_DIR} { minimal_init = '${MINIMAL_INIT}' }"
12+
-c "PlenaryBustedDirectory ${TESTS_DIR} { timeout = 1000, sequential = true, keep_going = true, minimal_init = '${MINIMAL_INIT}' }"
1313

14-
test-watch: ## Watching for changes to lua files
15-
nodemon -e lua -x "$(MAKE) test || exit 1"
14+
test-watch: ## uses [nodemon](https://nodemon.io/) - watches for changes to lua files and reruns tests
15+
@nodemon -e lua -x "$(MAKE) test || exit 1"
1616

17-
check: ## Run luacheck on the project
18-
luacheck . --globals vim it describe before_each after_each --exclude-files tests/fixtures --max-comment-line-length 140
17+
check: ## uses [luacheck](https://github.com/mpeterv/luacheck) - checks for any type errors or style issues
18+
@luacheck . --globals vim it describe before_each after_each --exclude-files tests/fixtures --max-comment-line-length 140
1919

20-
no-utils: ## Make sure there are no errant utils hanging around
20+
no-utils: ## Make sure there are no errant util calls which write to data directories
2121
@nvim \
2222
--headless \
2323
--noplugin \
@@ -30,3 +30,4 @@ help: ## Displays this information.
3030
@printf '%s\n' "Usage: make <command>"
3131
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}'
3232
@printf '\n'
33+

0 commit comments

Comments
 (0)