1.4 KiB
1.4 KiB
AGENTS
- Go 1.25; modules in
go.mod; binary namestatusline. - Build:
task build(stripped) orgo build -o bin/statusline .. - Run fixture:
task runorcat test/fixture.json | ./bin/statusline. - Tests:
task test(go test -v ./...); single test:go test -v -run 'TestName' ./.... - Coverage:
task test:cover; benchmarks:task benchortask bench:go. - Lint:
task lint(golangci-lint run); auto-fix:task lint:fix. - Formatting:
gofumpt+goimportsvia golangci-lint; keepgo fmt/gofumpt style. - Imports: organize with
goimports; stdlib first, then third-party, then local. - Types: prefer explicit types; avoid unused code (lint-enforced).
- Naming: follow Go conventions (ExportedCamelCase for exported, lowerCamelCase for unexported); no stutter.
- Errors: check and return errors; wrap or format with context; no silent ignores.
- Security:
gosecenabled; avoid leaking secrets; handle paths carefully. - Tests should avoid external deps; skip when environment-dependent.
- Modernization helpers:
task modernize/task modernize:test(gopls). - Clean artifacts:
task clean; binary lives inbin/. - Git info and gitea checks rely on
go-gitandgopsutil; keep deps updated viago mod tidy. - Keep ANSI handling via
stripANSIregex inmain.go; adjust carefully if changing. - No Cursor/Copilot rules present as of this file.
- No emojis in code or docs unless explicitly requested.