-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1.06 KB
/
Copy pathMakefile
File metadata and controls
43 lines (32 loc) · 1.06 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
.PHONY: build fmt fmt-lua fmt-go test test-go test-lua lint lint-lua lint-go check
## build: compile the Go service binary to bin/copilot-agent
build:
mkdir -p bin
cd server && go build -o ../bin/copilot-agent .
## fmt: format all source code (Lua + Go)
fmt: fmt-lua fmt-go
## fmt-lua: format Lua files with stylua (uses stylua.toml)
fmt-lua:
stylua lua/ plugin/
## fmt-go: format Go files with gofmt
fmt-go:
gofmt -w ./server
## test: run all tests (Go + Lua)
test: test-go test-lua
## test-go: run Go unit tests for the server
test-go:
cd server && go test ./... -v
## test-lua: run Lua integration tests with plenary
test-lua:
nvim --headless -u tests/minimal_init.lua -c "PlenaryBustedFile tests/integration/setup_spec.lua" -c qa
## lint: run all linters (Lua + Go)
lint: lint-lua lint-go
## lint-lua: run luacheck and stylua --check on Lua sources
lint-lua:
luacheck lua/ --globals vim --no-max-line-length
stylua --check lua/ plugin/
## lint-go: run go vet on the server
lint-go:
cd server && go vet ./...
## check: lint + test (full CI gate)
check: lint test