-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.22 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.22 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
45
# termite.nvim Makefile
# Stacking float terminal manager for Neovim
.PHONY: test test-file lint format help
# Default target
.DEFAULT_GOAL := help
# Test all spec files
test:
@nvim --headless --noplugin -u spec/init.lua -c "PlenaryBustedDirectory spec/ {minimal_init = 'spec/minimal_init.vim'}"
# Test a single file (usage: make test-file FILE=spec/config_spec.lua)
test-file:
@if [ -z "$(FILE)" ]; then \
echo "Usage: make test-file FILE=spec/config_spec.lua"; \
exit 1; \
fi
@nvim --headless -c "PlenaryBustedFile $(FILE)"
# Lint Lua code with luacheck
lint:
@luacheck lua/ plugin/ spec/
# Format Lua code with stylua
format:
@stylua lua/ plugin/ spec/
# Run all checks (format, lint, test)
check: format lint test
# Display help
help:
@echo "termite.nvim - Available targets:"
@echo ""
@echo " make test Run all tests"
@echo " make test-file FILE= Run a specific test file"
@echo " make lint Run luacheck linter"
@echo " make format Format code with stylua"
@echo " make check Run format, lint, and test"
@echo " make help Show this help message"
@echo ""
@echo "Examples:"
@echo " make test-file FILE=spec/config_spec.lua"
@echo " make check"