mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
Note that CI lint cache can go stale independent of local make lint (#2176)
Discovered while debugging a lint-CI failure on #2166: golangci-lint-action's persistent cross-commit cache can serve stale staticcheck (SA5011) results unrelated to a given diff, even when a fresh local run is clean. The job is continue-on-error so it doesn't block merges, but it's worth documenting so contributors don't chase a phantom local repro. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
4ab01f0f40
commit
d9d72a3ad1
2 changed files with 13 additions and 4 deletions
15
CLAUDE.md
15
CLAUDE.md
|
|
@ -70,9 +70,18 @@ make lint # Run golangci-lint, same invocation as CI (see Initial Setu
|
||||||
```
|
```
|
||||||
|
|
||||||
`make lint` runs `golangci-lint run ./cmd/mlr ./pkg/...`, matching
|
`make lint` runs `golangci-lint run ./cmd/mlr ./pkg/...`, matching
|
||||||
`.github/workflows/golangci-lint.yml` exactly, so a clean local run means CI's
|
`.github/workflows/golangci-lint.yml` exactly, so a clean local run usually
|
||||||
lint job will pass too. It is not part of `make check` or `make dev`, so run
|
means CI's lint job will pass too. It is not part of `make check` or
|
||||||
it explicitly before pushing.
|
`make dev`, so run it explicitly before pushing.
|
||||||
|
|
||||||
|
**Note:** CI's lint job restores a persistent `golangci-lint` results cache
|
||||||
|
shared across commits and PRs (via `golangci-lint-action`), which can
|
||||||
|
occasionally serve stale `staticcheck` results (e.g. spurious `SA5011`
|
||||||
|
nil-check warnings) unrelated to your diff. The job is `continue-on-error:
|
||||||
|
true` for this reason, so it won't block merging. If CI lint fails but
|
||||||
|
`make lint` is clean locally, it's likely a stale cache — rerun the job, or a
|
||||||
|
maintainer can clear it: `gh cache list --key golangci-lint` then
|
||||||
|
`gh cache delete <id>`.
|
||||||
|
|
||||||
### Full Developer Workflow
|
### Full Developer Workflow
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Quickstart for developers
|
# Quickstart for developers
|
||||||
|
|
||||||
* `make`, `make check`, `make docs`, etc: see [Makefile](Makefile) in the repo base directory.
|
* `make`, `make check`, `make docs`, etc: see [Makefile](Makefile) in the repo base directory.
|
||||||
* Linting: `make lint` runs [golangci-lint](https://golangci-lint.run/) (config in [.golangci.yml](.golangci.yml)) with the same invocation used by [.github/workflows/golangci-lint.yml](.github/workflows/golangci-lint.yml), so a clean local run means CI's lint job will pass too. Install golangci-lint locally per the [official instructions](https://golangci-lint.run/welcome/install/#local-installation) (match the CI version, currently v2.12.2). It's a separate step from `make dev`/`make check` -- run it explicitly before pushing. `make staticcheck` (requires [staticcheck](https://staticcheck.io)) is a second, independent static-analysis pass.
|
* Linting: `make lint` runs [golangci-lint](https://golangci-lint.run/) (config in [.golangci.yml](.golangci.yml)) with the same invocation used by [.github/workflows/golangci-lint.yml](.github/workflows/golangci-lint.yml), so a clean local run usually means CI's lint job will pass too. Install golangci-lint locally per the [official instructions](https://golangci-lint.run/welcome/install/#local-installation) (match the CI version, currently v2.12.2). It's a separate step from `make dev`/`make check` -- run it explicitly before pushing. `make staticcheck` (requires [staticcheck](https://staticcheck.io)) is a second, independent static-analysis pass. Note: CI's lint job caches `staticcheck` results across commits/PRs and can occasionally fail on a stale cache (spurious warnings unrelated to your diff) even when `make lint` is clean locally; the job is `continue-on-error: true` so this won't block merging, and a maintainer can clear the cache with `gh cache delete` if needed.
|
||||||
* Software-testing methodology: see [./test/README.md](./test/README.md).
|
* Software-testing methodology: see [./test/README.md](./test/README.md).
|
||||||
* Source-code indexing: please see [https://sourcegraph.com/github.com/johnkerl/miller](https://sourcegraph.com/github.com/johnkerl/miller)
|
* Source-code indexing: please see [https://sourcegraph.com/github.com/johnkerl/miller](https://sourcegraph.com/github.com/johnkerl/miller)
|
||||||
* Godoc As of September 2021, `godoc` support is minimal: package-level synopses exist; most `func`/`const`/etc content lacks `godoc`-style comments. To view doc material, you can:
|
* Godoc As of September 2021, `godoc` support is minimal: package-level synopses exist; most `func`/`const`/etc content lacks `godoc`-style comments. To view doc material, you can:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue