chore: stricter golangci-lint, with gofumpt and goimports #77

Merged
jwarykowski merged 1 commit from chore/lint into master 2026-10-15 11:51:11 +00:00
Owner

The golangci-lint v2 config keybars and licence now use: the standard linters plus errorlint, gocritic, revive, misspell (UK spelling, comments only, skipping Go names like Serialize), modernize, intrange and others, with gofumpt and goimports as formatters.

  • CI pins golangci-lint v2.14.0 and drops the separate gofmt step (golangci-lint checks formatting); the pre-commit hook formats with golangci-lint when installed, else gofmt
  • fixed: comment spellings (flag and env names like --no-color and $NO_COLOR left as they are), shadowed max, if-else chains as switches, simpler min/max, an unused test return
  • scrollOffset keeps its exact behaviour; openLink keeps returning a tea.Cmd for its callers

Tested: go test ./..., golangci-lint run (0 issues), go build.

The golangci-lint v2 config keybars and licence now use: the standard linters plus errorlint, gocritic, revive, misspell (UK spelling, comments only, skipping Go names like Serialize), modernize, intrange and others, with gofumpt and goimports as formatters. - CI pins golangci-lint v2.14.0 and drops the separate gofmt step (golangci-lint checks formatting); the pre-commit hook formats with golangci-lint when installed, else gofmt - fixed: comment spellings (flag and env names like `--no-color` and `$NO_COLOR` left as they are), shadowed `max`, if-else chains as switches, simpler `min`/`max`, an unused test return - `scrollOffset` keeps its exact behaviour; `openLink` keeps returning a `tea.Cmd` for its callers Tested: `go test ./...`, `golangci-lint run` (0 issues), `go build`.
chore: stricter golangci-lint, with gofumpt and goimports
All checks were successful
pull-request / lint-and-test (pull_request) Successful in 1m17s
16f1852996
The shared golangci-lint v2 config: the standard linters plus errorlint,
gocritic, revive, misspell (UK, comments only), modernize, intrange and
others, with gofumpt and goimports. CI pins v2.14.0 and drops the separate
gofmt step; the pre-commit hook formats with golangci-lint when it's
installed. Fixes what it found: comment spellings, shadowed max, if-else
chains, simpler min and max, unused returns.
jwarykowski deleted branch chore/lint 2026-10-15 11:51:11 +00:00
Sign in to join this conversation.
No description provided.