build: replace Make with go-task for modern task running#131
Conversation
Replace the 69-line Makefile with a comprehensive Taskfile.yml (420+ lines) using go-task (https://taskfile.dev) for better task organization and features. New capabilities added: - 45+ tasks vs original 10 Makefile targets - Task namespacing (build:cli, test:race, lint:fix, etc.) - Cross-platform builds (linux, darwin, windows / amd64, arm64) - CPU and memory profiling support - Fuzz testing integration - Security scanning (govulncheck) - LSP server commands - CI/CD pipeline tasks - Release management with goreleaser - Development watch mode - Parameterized tasks (PKG, SQL, FUZZ_TIME variables) Documentation updated: - CLAUDE.md: Updated all build/test commands to use task - README.md: Added Task runner prerequisites and updated commands Install task with: go install github.com/go-task/task/v3/cmd/task@latest 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @ajitpratap0's task —— View job PR Review: Replace Make with go-taskI've completed a comprehensive review of this PR that replaces the Makefile with a modern Taskfile.yml. Overall, this is a high-quality improvement that significantly enhances the project's build system. Todo List:
✅ Code Quality & Best PracticesExcellent Structure:
Task Design:
🔍 Security AssessmentGood Security Practices:
Security Enhancement:
🚀 Performance ConsiderationsSignificant Improvements:
Benchmarking Enhancements:
🛠 CI/CD ImprovementsEnhanced Pipeline:
Critical Testing:
📚 Documentation AlignmentExcellent Consistency:
🐛 Minor Issues & Suggestions1. Missing Error Handling (Taskfile.yml:208, 339)# Current - potential silent failures
lint:fix:
cmds:
- golangci-lint run --fix
# Suggested improvement
lint:fix:
cmds:
- |
if command -v golangci-lint > /dev/null; then
golangci-lint run --fix
else
echo "golangci-lint not installed. Run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
exit 1
fi2. Development Tool Consistency (Taskfile.yml:404)The 3. Script DependenciesTaskfile references scripts but doesn't validate their existence. Consider adding checks or making paths configurable. 📊 Test Coverage AnalysisComprehensive Testing:
🎯 Overall AssessmentThis PR represents a significant modernization of the build system: ✅ Strengths:
|
Update remaining Make/Makefile references across documentation: - CONTRIBUTING.md: Update prerequisites, hooks installation commands, and PR checklist to use task commands - scripts/install-hooks.sh: Update hint message from 'make fmt' to 'task fmt' - docs/CLI_GUIDE.md: Replace Makefile example with Taskfile.yml example for build tools integration - docs/PRODUCTION_GUIDE.md: Update build tools reference to Task 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Claude finished @ajitpratap0's task —— View job PR Review: Replace Make with go-taskI've completed a comprehensive review of this PR that replaces the Makefile with a modern Taskfile.yml. Overall, this is a high-quality improvement that significantly enhances the project's build system. Todo List:
✅ Code Quality & Best PracticesExcellent Structure:
Task Design:
🔍 Security AssessmentGood Security Practices:
Security Enhancement:
🚀 Performance ConsiderationsSignificant Improvements:
Benchmarking Enhancements:
🛠 CI/CD ImprovementsEnhanced Pipeline:
Critical Testing:
📚 Documentation AlignmentExcellent Consistency:
🐛 Minor Issues & Suggestions1. Missing Error Handling (Taskfile.yml:208, 339)# Current - potential silent failures
lint:fix:
cmds:
- golangci-lint run --fix
# Suggested improvement
lint:fix:
cmds:
- |
if command -v golangci-lint > /dev/null; then
golangci-lint run --fix
else
echo "golangci-lint not installed. Run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
exit 1
fi2. Development Tool Consistency (Taskfile.yml:404)The 3. Script DependenciesTaskfile references scripts but doesn't validate their existence. Consider adding checks or making paths configurable. 📊 Test Coverage AnalysisComprehensive Testing:
🎯 Overall AssessmentThis PR represents a significant modernization of the build system: ✅ Strengths:
|
Fixes based on code review feedback: 1. Add error handling to lint:fix task - now checks if golangci-lint is installed before running, with helpful installation message 2. Add watchexec installation info to deps:tools - users are now informed about optional watchexec for 'task dev' watch mode 3. Add script existence checks: - hooks:install: validates scripts/install-hooks.sh exists - fuzz: validates scripts/run_fuzz_tests.sh exists - security:validate: validates scripts/validate-security-setup.sh exists 4. Add error handling for release tasks: - release:dry: checks for goreleaser installation - release:check: checks for goreleaser installation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Review Comments Addressed ✅All issues identified in the code review have been fixed: 1. Missing Error Handling for
|
|
Claude finished @ajitpratap0's task —— View job PR Review: Replace Make with go-taskI've completed a comprehensive review of this PR that replaces the Makefile with a modern Taskfile.yml. Overall, this is a high-quality improvement that significantly enhances the project's build system. Todo List:
✅ Code Quality & Best PracticesExcellent Structure:
Task Design:
🔍 Security AssessmentGood Security Practices:
Security Enhancement:
🚀 Performance ConsiderationsSignificant Improvements:
Benchmarking Enhancements:
🛠 CI/CD ImprovementsEnhanced Pipeline:
Critical Testing:
📚 Documentation AlignmentExcellent Consistency:
🐛 Minor Issues & Suggestions1. Missing Error Handling (Taskfile.yml:208, 339)# Current - potential silent failures
lint:fix:
cmds:
- golangci-lint run --fix
# Suggested improvement
lint:fix:
cmds:
- |
if command -v golangci-lint > /dev/null; then
golangci-lint run --fix
else
echo "golangci-lint not installed. Run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest"
exit 1
fi2. Development Tool Consistency (Taskfile.yml:404)The 3. Script DependenciesTaskfile references scripts but doesn't validate their existence. Consider adding checks or making paths configurable. 📊 Test Coverage AnalysisComprehensive Testing:
🎯 Overall AssessmentThis PR represents a significant modernization of the build system: ✅ Strengths:
|
Summary
Files Changed
Core Migration
Taskfile.ymlMakefileCLAUDE.mdtaskREADME.mdDocumentation Updates
CONTRIBUTING.mddocs/CLI_GUIDE.mddocs/PRODUCTION_GUIDE.mdscripts/install-hooks.shmake fmttotask fmtNew Capabilities
Build Tasks
task build- Build all packagestask build:cli- Build CLI binarytask build:cli:all- Cross-platform builds (linux/darwin/windows, amd64/arm64)task install- Install CLI globallyTest Tasks
task test- Run all teststask test:short- Quick teststask test:race- Tests with race detection (CRITICAL for production)task test:pkg PKG=./pkg/models- Package-specific testsCoverage & Benchmarks
task coverage- Generate HTML coverage reporttask coverage:func- Coverage by functiontask bench- Run all benchmarkstask bench:cpu/task bench:mem- Profiling supportCode Quality
task fmt/task fmt:check- Format and check formattingtask vet- Run go vettask lint/task lint:fix- Linting with auto-fixtask staticcheck- Static analysistask quality- Run all quality checksSecurity & CI/CD
task security:scan- Vulnerability scanning (govulncheck)task ci- Full CI pipelinetask ci:quick- Quick CI checktask release:dry- Goreleaser dry runDevelopment
task lsp/task lsp:debug- Start LSP servertask validate SQL="..."- Validate SQL syntaxtask format:sql SQL="..."- Format SQLtask dev- Watch mode for developmentInstallation
Test plan
task buildworkstask test:shortworkstask vetworkstask depsworkstask lintruns (golangci-lint config issue is pre-existing)task --listshows all 45+ tasks🤖 Generated with Claude Code