-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 1.07 KB
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 1.07 KB
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
.PHONY: lint format format-check test check-state-deps check-purity check-docs coverage all setup
lint:
luacheck lua/ plugin/ tests/ scripts/
format:
stylua lua/ plugin/ tests/ scripts/
format-check:
stylua --check lua/ plugin/ tests/ scripts/
test:
bash run_tests.sh
check-state-deps:
nvim --headless -l scripts/check_state_deps.lua
check-purity:
nvim --headless -l scripts/check_purity.lua
check-docs:
nvim --headless -l scripts/check_docs.lua
# Test coverage via luacov. Requires `luarocks install --local luacov`.
# `eval $(luarocks path)` exports LUA_PATH so nvim can require("luacov.runner").
# Stats and report files are gitignored. Not part of `make all` (report-only).
coverage:
@rm -f luacov.stats.out luacov.report.out
@eval "$$(luarocks path)" && LUACOV=1 bash run_tests.sh
@eval "$$(luarocks path)" && luacov
@echo ""
@echo "==> Coverage summary:"
@awk '/^Summary$$/,0' luacov.report.out
@echo ""
@echo "==> Full report: luacov.report.out"
all: lint format-check test check-state-deps check-purity check-docs
setup:
git config core.hooksPath .githooks