forked from noir4y/comment-translate.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (35 loc) · 1.01 KB
/
Makefile
File metadata and controls
45 lines (35 loc) · 1.01 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
.PHONY: test test-file clean fmt fmt-check lint
# Test runner
PLENARY_DIR ?= /tmp/plenary.nvim
# Clone plenary if not exists
$(PLENARY_DIR):
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim $(PLENARY_DIR)
# Run all tests
test: $(PLENARY_DIR)
@echo "Running tests..."
nvim --headless --noplugin -u tests/minimal_init.lua \
-c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.lua', sequential = true}"
# Run a specific test file
test-file: $(PLENARY_DIR)
@echo "Running $(FILE)..."
nvim --headless --noplugin -u tests/minimal_init.lua \
-c "PlenaryBustedFile $(FILE)"
# Clean temporary files
clean:
rm -rf $(PLENARY_DIR)
# Generate documentation tags
docs:
@echo "Generating help tags..."
nvim --headless -c "helptags doc/" -c "qa"
# Health check
health:
nvim --headless -c "checkhealth comment-translate" -c "qa"
# Format Lua files
fmt:
stylua lua plugin tests
# Check Lua formatting
fmt-check:
stylua --check lua plugin tests
# Lint Lua files
lint:
luacheck lua plugin tests