Commit 9c96db4
fix: lint with the repository's pinned Go, and stop filtering to changed code
The lint job failed on this branch with a gofmt-class finding on
client/internal/retry_test.go:46 that no local run reproduces.
The cause is the toolchain, not the code. The job used 'go-version: stable',
which resolved to Go 1.27.0, while go.mod pins 1.26 and the dev shell provides
1.26.5. gofmt is part of this job, and 1.27 aligns that line's end-of-line comment
group differently. Everything else was controlled: same golangci-lint 2.13.0, same
file, same config, a pristine checkout and an empty cache all report a clean tree
under 1.26.5. So the job now takes its Go from go.mod, like the build and test
jobs already do. Linting formatting with a newer toolchain than the code is
written against reports differences no contributor can reproduce.
Dropping only-new-issues is the second half. It exists so a pull request against a
large legacy codebase is not buried in pre-existing findings; this repository
starts clean and CI keeps it clean from the first commit, so filtering to changed
code cannot help and can only hide a real finding. It was hiding this one: the
finding is real under Go 1.27, and the provider's lint job stays green on the same
file only because the flag is set there too and the file is untouched by the pushes
it filters against. That latent drift is still in the provider's workflow.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 163b976 commit 9c96db4
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
0 commit comments