go/Taskfile.yml
Snider 94723454a8 feat(i18n): add compile-time key validation tool
Adds cmd/i18n-validate that scans Go source files for i18n key usage
and validates them against locale JSON files and registered intents.

Features:
- Scans T(), C(), I(), and qualified i18n.* calls
- Expands ./... pattern to find all Go packages
- Validates message keys against locale JSON files
- Validates intent keys against registered core.* intents
- Reports missing keys with file:line locations
- Skips constant references (type-safe usage)

Usage:
  go run ./cmd/i18n-validate ./...
  task i18n:validate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 13:18:58 +00:00

56 lines
1.3 KiB
YAML

version: '3'
includes:
gui: ./cmd/lthn-desktop/Taskfile.yml
cli: ./cmd/core/Taskfile.yml
demo: ./cmd/core-demo/Taskfile.yml
ide: ./cmd/core-gui/Taskfile.yml
tasks:
test:
desc: "Run all Go tests recursively for the entire project."
cmds:
- cmd: clear
platforms: [linux, darwin]
- cmd: cls
platforms: [windows]
- cmd: go test ./...
review:
desc: "Run CodeRabbit review to get feedback on the current changes."
cmds:
- coderabbit review --prompt-only
check:
desc: "Run a CodeRabbit review followed by the full test suite."
cmds:
- task: go:mod:tidy
- go test ./... # make sure the code compiles before asking coderabbit to review it
- task: review
go:mod:tidy:
summary: Runs `go mod tidy`
internal: true
cmds:
- go mod tidy
cov:
desc: "Generate coverage profile (coverage.txt)"
cmds:
- go test -coverprofile=coverage.txt ./...
cov-view:
desc: "Open the coverage report in your browser."
cmds:
- task: cov
- go tool cover -html=coverage.txt
i18n:generate:
desc: "Regenerate i18n key constants from locale files"
cmds:
- go generate ./pkg/i18n/...
i18n:validate:
desc: "Validate i18n key usage across the codebase"
cmds:
- go run ./cmd/i18n-validate ./...