29 lines
1.4 KiB
Markdown
29 lines
1.4 KiB
Markdown
# AGENTS
|
|
|
|
- Go 1.25; modules in `go.mod`; binary name `statusline`.
|
|
- Build: `task build` (stripped) or `go build -o bin/statusline .`.
|
|
- Run fixture: `task run` or `cat test/fixture.json | ./bin/statusline`.
|
|
- Tests: `task test` (`go test -v ./...`); single test:
|
|
`go test -v -run 'TestName' ./...`.
|
|
- Coverage: `task test:cover`; benchmarks: `task bench` or `task bench:go`.
|
|
- Lint: `task lint` (`golangci-lint run`); auto-fix: `task lint:fix`.
|
|
- Formatting: `gofumpt` + `goimports` via golangci-lint; keep `go 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: `gosec` enabled; 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 in `bin/`.
|
|
- Git info and gitea checks rely on `go-git` and `gopsutil`; keep deps updated
|
|
via `go mod tidy`.
|
|
- Keep ANSI handling via `stripANSI` regex in `main.go`; adjust carefully if
|
|
changing.
|
|
- No Cursor/Copilot rules present as of this file.
|
|
- No emojis in code or docs unless explicitly requested.
|