-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 1.25 KB
/
Copy pathMakefile
File metadata and controls
44 lines (34 loc) · 1.25 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
.SUFFIXES:
all:
# runs all the test files.
test:
nvim --version | head -n 1 && echo ''
nvim --headless --noplugin -u ./scripts/minimal_init.lua \
-c "lua require('mini.test').setup()" \
-c "lua MiniTest.run({ execute = { reporter = MiniTest.gen_reporter.stdout({ group_depth = 1 }) } })"
# installs `mini.nvim`, used for both the tests and documentation.
deps:
@mkdir -p deps
git clone --depth 1 https://github.com/echasnovski/mini.nvim deps/mini.nvim
# installs deps before running tests, useful for the CI.
test-ci: deps test
# generates the documentation.
documentation:
nvim --headless --noplugin -u ./scripts/minimal_init.lua -c "luafile ./scripts/docgen.lua" -c "qa!"
# installs deps before running the documentation generation, useful for the CI.
documentation-ci: deps documentation
# performs a lint check and fixes issues if possible, following the config in `stylua.toml`.
lint:
stylua .
# installs the lefthook-managed git hooks defined in `lefthook.yml`.
hooks-install:
@command -v lefthook >/dev/null 2>&1 || { \
echo "hooks-install: lefthook is not installed (brew install lefthook)" >&2; \
exit 1; \
}
@lefthook install
# runs the lefthook pre-commit jobs on demand, outside of git.
precommit:
@lefthook run pre-commit
clean:
rm -rf deps