| 1 |
.DEFAULT_GOAL = check |
| 2 |
|
| 3 |
lint: |
| 4 |
@luacheck lua/lualine/ |
| 5 |
@luacheck tests/ |
| 6 |
@luacheck examples/ |
| 7 |
|
| 8 |
format: |
| 9 |
@stylua --config-path=.stylua.toml lua/ examples/ tests/ |
| 10 |
|
| 11 |
test: |
| 12 |
@mkdir -p tmp_home |
| 13 |
@export XDG_DATA_HOME='./tmp_home' && \ |
| 14 |
export XDG_CONFIG_HOME='./tmp_home' && \ |
| 15 |
bash ./scripts/test_runner.sh |
| 16 |
@rm -rf tmp_home |
| 17 |
|
| 18 |
# Install luacov & luacov-console from luarocks |
| 19 |
testcov: |
| 20 |
@mkdir -p ./tmp_home/data/nvim |
| 21 |
@mkdir -p ./tmp_home/config/nvim |
| 22 |
@export XDG_DATA_HOME=$(realpath './tmp_home/data') && \ |
| 23 |
export XDG_CONFIG_HOME=$(realpath './tmp_home/config') && \ |
| 24 |
export TEST_COV=true && \ |
| 25 |
bash ./scripts/test_runner.sh |
| 26 |
@luacov-console lua/ |
| 27 |
@luacov-console -s |
| 28 |
ifeq ($(NOCLEAN), ) |
| 29 |
@rm luacov.* |
| 30 |
endif |
| 31 |
@rm -rf tmp_home |
| 32 |
|
| 33 |
docgen: |
| 34 |
@sh ./scripts/docgen.sh |
| 35 |
|
| 36 |
precommit_check: docgen format test lint |
| 37 |
|
| 38 |
check: lint test |