-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 1002 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (23 loc) · 1002 Bytes
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
.PHONY: all format lint check clean test test-all
all: format lint
format:
@echo "Formatting with stylua..."
@stylua . || echo "stylua not installed, run: cargo install stylua"
lint:
@echo "Linting with luacheck..."
@luacheck . || echo "luacheck not installed, run: luarocks install luacheck"
check: format lint
clean:
@echo "Cleaning up..."
@find . -name "*.swp" -delete
@find . -name "*.swo" -delete
@find . -name "*~" -delete
test: test-all
test-all:
@echo "Running all tests..."
@nvim --headless --noplugin -u tests/minimal_init.lua \
-c "lua MiniTest.run({ collect = { find_files = function() return vim.fn.glob('tests/test_*.lua', false, true) end }, execute = { reporter = MiniTest.gen_reporter.stdout({ quit_on_finish = true }) } })" 2>&1
test-%:
@echo "Running test: $*..."
@nvim --headless --noplugin -u tests/minimal_init.lua \
-c "lua MiniTest.run_file('tests/test_$*.lua', { execute = { reporter = MiniTest.gen_reporter.stdout({ quit_on_finish = true }) } })" 2>&1