grokkit/Makefile
Greg Gauthier 9927b1fb6a chore(build): add Makefile and tests for commands and utilities
- Introduced Makefile with targets for testing (all, coverage, agent-specific), building, installing, cleaning, and help
- Added unit and integration tests for agent command, edit command, and CleanCodeResponse function
- Refactored CleanCodeResponse to use regex for robust markdown fence removal in agent and client modules
- Ensured tests cover code cleaning, plan generation placeholders, and file editing functionality
2026-03-01 00:24:48 +00:00

33 lines
902 B
Makefile

.PHONY: test test-cover test-agent build install clean
test:
go test ./... -v
test-cover:
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
@echo "✅ Coverage report: open coverage.html in your browser"
test-agent:
go test -run TestAgent ./... -v
build:
go build -ldflags "-s -w" -trimpath -o build/grokkit .
install: build
mkdir -p ~/.local/bin
cp build/grokkit ~/.local/bin/grokkit
chmod +x ~/.local/bin/grokkit
@echo "✅ grokkit installed to ~/.local/bin"
clean:
rm -rf build/ coverage.out coverage.html
help:
@echo "Available targets:"
@echo " test Run all tests"
@echo " test-cover Run tests + generate HTML coverage report"
@echo " test-agent Run only agent tests"
@echo " build Build optimized binary"
@echo " install Build and install to ~/.local/bin"
@echo " clean Remove build artifacts"