Fix Goconst Lint Findings for Checkpoint · Entire

Recent changes seem to have broken the lint step in CI:

❯ mise run lint
[lint:shellcheck] $ ~/entire/cli/.worktrees/fix-lint-on-main/mise-tasks/lint/shellcheck
[lint:go] $ ~/entire/cli/.worktrees/fix-lint-on-main/mise-tasks/lint/go
[lint:gomod] $ ~/entire/cli/.worktrees/fix-lint-on-main/mise-tasks/lint/gomod
[lint:mise] $ ~/entire/cli/.worktrees/fix-lint-on-main/mise-tasks/lint/mise
[lint:gofmt] $ ~/entire/cli/.worktrees/fix-lint-on-main/mise-tasks/lint/gofmt
[lint:mise] Finished in 298.9ms
[lint:gofmt] Finished in 727.6ms
[lint:shellcheck] Finished in 736.5ms
[lint:go] golangci-lint has version 2.11.3 built with go1.26.1 from 6008b81b on 2026-03-10T10:25:44Z
[lint:gomod] Finished in 1.10s
[lint:go] cmd/entire/cli/review_context.go:383:10: string `checkpoint` has 3 occurrences, make it a constant (goconst)
[lint:go] return "checkpoint"
[lint:go] ^
[lint:go] cmd/entire/cli/runner_gather.go:57:8: string `trail` has 3 occurrences, make it a constant (goconst)
[lint:go] case "trail", "trails":
[lint:go] ^
[lint:go] 2 issues:
[lint:go] * goconst: 2
Finished in 21.36s
[lint:go] ERROR task failed

We should address that.


goconst isn't firing in scratch — likely no go.mod so analysis is skipped. Let me add a module.


mise run lint → 0 issues (cold cache, matching a fresh CI run). Fixed.

What I changed

Two goconst findings — repeated string literals checkpoint and trail crossing the 3-occurrence threshold after the recent trail tune refactor added a new occurrence of each in runner_gather.go:

The unrelated writestring/stringsseq IDE diagnostics are from a different linter set (not in this repo's .golangci.yaml) and are pre-existing — mise run lint passes clean.

One note on why this looked confusing: those strings actually occur ~25/14 times package-wide (mostly tests), all baseline-suppressed by golangci-lint-action's new-issue filtering. The refactor added a new occurrence in a new file, which is what tripped CI. These two edits neutralize the new occurrences, so lint is green again without touching the grandfathered ones.

Want me to commit this?


Could you assign trails and checkpoints to constants as well for consistency?


All four source tokens are now constants and the switch reads consistently:

const (
    sourceCheckpoint  = "checkpoint"
    sourceCheckpoints = "checkpoints"
    sourceTrail       = "trail"
    sourceTrails      = "trails"
)
case sourceCheckpoint, sourceCheckpoints:
    s.checkpoints = true
case sourceTrail, sourceTrails:
    s.trails = true

Lint stays clean (0 issues). Want me to commit?


Committed. Now running the PR skill.

Commit message

77cada3fix(lint): resolve goconst findings for checkpoint/trail

Recent refactors pushed the repeated "checkpoint" and "trail" string literals over goconst's occurrence threshold, breaking CI lint.

Reuse the existing pluralize helper in reviewContextCheckpointNoun (which also drops a duplicated helper), and name the tune-source tokens as constants in parseTuneSources.


Draft PR created: https://github.com/entireio/cli/pull/1594