2021-05-05 18:04:16 +00:00
|
|
|
.DEFAULT_GOAL = check
|
|
|
|
|
|
|
|
lint:
|
2022-03-26 09:43:56 +00:00
|
|
|
@luacheck lua/lualine/
|
|
|
|
@luacheck 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-03-25 13:35:59 +00:00
|
|
|
bash ./scripts/test_runner.sh
|
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-03-25 13:35:59 +00:00
|
|
|
bash ./scripts/test_runner.sh
|
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:
|
2022-03-02 13:37:08 +00:00
|
|
|
@sh ./scripts/docgen.sh
|
2021-09-14 06:58:46 +00:00
|
|
|
|
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
|