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' && \
|
2022-02-01 08:00:36 +00:00
|
|
|
nvim --headless -u lua/tests/minimal_init.lua -c "lua require'plenary.test_harness'.test_directory( 'lua/tests/', { minimal_init = './lua/tests/minimal_init.lua' })" -c "qa!"
|
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:
|
2022-02-01 08:00:36 +00:00
|
|
|
@mkdir -p ./tmp_home/data/nvim
|
|
|
|
@mkdir -p ./tmp_home/config/nvim
|
|
|
|
@export XDG_DATA_HOME=$(realpath './tmp_home/data') && \
|
|
|
|
export XDG_CONFIG_HOME=$(realpath './tmp_home/config') && \
|
2021-10-13 15:51:19 +00:00
|
|
|
export TEST_COV=true && \
|
2022-02-01 08:00:36 +00:00
|
|
|
nvim --headless -u lua/tests/minimal_init.lua -c "lua require'plenary.test_harness'.test_directory( 'lua/tests/', { minimal_init = './lua/tests/minimal_init.lua' })" -c "qa!"
|
2021-10-13 15:51:19 +00:00
|
|
|
@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
|