Skip to content

ci: pin the lint rules and the linter version - #35

Merged
tamnd merged 1 commit into
mainfrom
ci-lint-green
Aug 17, 2026
Merged

tamnd merged 1 commit into
mainfrom
ci-lint-green

Conversation

@tamnd

@tamnd tamnd commented Aug 17, 2026

Copy link
Copy Markdown
Owner

The lint job ran golangci-lint at latest with no config file, so its defaults were the gate and its defaults move. A linter release turned main red on a commit nobody touched.

  • .golangci.yml writes the rules down: the standard linter set, plus the upstream std-error-handling exclusions for writes to stdout and stderr, Close on a file that was only read, and Flush on a tabwriter about to be discarded. The alternative was _, _ = in front of 121 print calls.
  • The action pins v2.12.1 instead of floating to latest.
  • Three findings are fixed rather than excluded: four struct literals that are conversions (S1016), reflect.Ptr for reflect.Pointer, and parser.ParseDir, deprecated since Go 1.25 for ignoring build tags, replaced with a ReadDir and ParseFile walk.

Homebrew and Scoop needed no change: both already self-disable when their token is unset, and the v0.3.0 release run confirms it with "brew.skip_upload is set" and "scoop.skip_upload is true" while the release itself went green.

golangci-lint run ./... reports 0 issues, and gofmt, vet and the full test run are clean.

The lint job ran golangci-lint at latest with no config, so its defaults
decided the gate and its defaults move. A linter release turned main red
on a commit nobody touched, which is how a gate stops being read.

The rules are written down now, with the upstream exclusions for writes
to stdout and Close on a file that was only read, and the version is
pinned. Three real findings are fixed rather than excluded: the four
struct literals that are conversions, reflect.Ptr for reflect.Pointer,
and parser.ParseDir, which is deprecated for ignoring build tags.
@tamnd
tamnd merged commit 05af931 into main Aug 17, 2026
7 checks passed
@tamnd
tamnd deleted the ci-lint-green branch August 17, 2026 07:08
@tamnd tamnd mentioned this pull request Aug 17, 2026
5 of 7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant