2021-05-05 18:04:16 +00:00
|
|
|
.DEFAULT_GOAL = check
|
|
|
|
|
|
|
|
lint:
|
|
|
|
@luacheck lua/lualine
|
2021-05-09 21:11:18 +00:00
|
|
|
@luacheck lua/tests
|
2021-08-13 19:34:33 +00:00
|
|
|
@luacheck examples/
|
2021-05-05 18:04:16 +00:00
|
|
|
|
|
|
|
format:
|
2021-09-03 18:20:34 +00:00
|
|
|
@stylua --config-path=.stylua.toml lua/ examples/
|
2021-05-05 18:04:16 +00:00
|
|
|
|
|
|
|
test:
|
2021-10-13 15:51:19 +00:00
|
|
|
@mkdir -p tmp_home
|
|
|
|
@export XDG_DATA_HOME='./tmp_home' && \
|
|
|
|
export XDG_CONFIG_HOME='./tmp_home' && \
|
|
|
|
nvim --headless --noplugin --clean -u lua/tests/minimal_init.lua -c "lua require'plenary.test_harness'.test_directory( 'lua/tests/', { minimal_init = './lua/tests/minimal_init.lua' })"
|
2021-10-22 04:19:29 +00:00
|
|
|
@rm -rf tmp_home
|
2021-10-13 15:51:19 +00:00
|
|
|
|
|
|
|
# Install luacov & luacov-console from luarocks
|
|
|
|
testcov:
|
|
|
|
@mkdir -p tmp_home
|
|
|
|
@export XDG_DATA_HOME='./tmp_home' && \
|
|
|
|
export XDG_CONFIG_HOME='./tmp_home' && \
|
|
|
|
export TEST_COV=true && \
|
|
|
|
nvim --headless --noplugin --clean -u lua/tests/minimal_init.lua -c "lua require'plenary.test_harness'.test_directory( 'lua/tests/', { minimal_init = './lua/tests/minimal_init.lua' })"
|
|
|
|
@luacov-console lua/
|
|
|
|
@luacov-console -s
|
|
|
|
ifeq ($(NOCLEAN), )
|
|
|
|
@rm luacov.*
|
|
|
|
endif
|
2021-10-22 04:19:29 +00:00
|
|
|
@rm -rf tmp_home
|
2021-05-05 18:04:16 +00:00
|
|
|
|
2021-09-14 06:58:46 +00:00
|
|
|
docgen:
|
|
|
|
@bash ./scripts/docgen.sh
|
|
|
|
|
2021-09-20 11:46:38 +00:00
|
|
|
precommit_check: docgen format test lint
|
|
|
|
|
2021-05-05 18:04:16 +00:00
|
|
|
check: lint test
|