Skip to content

Run golangci-lint v1.64.8, the release the CI lint job installs, from make lint and the contributor docs, since golangci-lint 2.x does not load the v1-format .golangci.yml (#61) - #63

Merged
thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-18-r3
Oct 18, 2026

Conversation

@thebenignhacker

Copy link
Copy Markdown
Member

This pull request lands 1 commit in Makefile, CONTRIBUTING.md, docs/development.md, CHANGELOG.md and cmd/cryptodeps.

Included

Verified on this exact tree

  • go build -v ./...: exit 0
  • go vet ./...: exit 0
  • make lint (go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8 run ./...): exit 0, no issues printed
  • go test -race -p 4 -json ./...: exit 0; packages: 13 ok (13 of them reported as cached), 3 with no test files, 0 failed; top-level tests: 531 passed, 0 failed, 1 skipped; with subtests: 1630 passed, 0 failed, 1 skipped

Not included

  • c6e3d8f: with it applied, go test -race -p 4 -json ./... failed TestRequirementsTxtVersionEndsWithItsSpecifier in internal/manifest (3 subtests), for example dependency = cryptography ">=41.0, <43" at line 1, want cryptography "41.0, <43" at line 1

Closes

Refs #61

How to merge

Rebase and merge, so that each change stays its own commit on main.

… make lint and the contributor docs, since golangci-lint 2.x does not load the v1-format .golangci.yml (#61)

The Makefile lint target, CONTRIBUTING.md lines 46, 55 and 165 and
docs/development.md line 26 ran the golangci-lint on PATH. .golangci.yml
is in the v1 configuration format: golangci-lint 2.12.2 stops on it with
"can't load config: unsupported version of the configuration" and exit
code 3, and the run command of golangci-lint 2.0.0 refuses a file without
version: "2". The CI lint job asks golangci-lint-action@v4 for "latest",
and its log reads "Requested golangci-lint 'latest', using 'v1.64.8'".

make lint now runs golangci-lint through go run at GOLANGCI_LINT_VERSION,
set to v1.64.8 in the Makefile, and both pages tell contributors to run
make lint. CONTRIBUTING.md also gives the go run command for the same
release without make. With golangci-lint 2.12.2 on PATH, make lint exited
0; the same command with -v named .golangci.yml as its config, listed six
active linters (errcheck, gosimple, govet, ineffassign, staticcheck,
unused) and reported 0 issues after processing.

The configuration stays in the v1 format: golangci-lint v1.64.8 refuses a
file that carries a version key ("you are using a configuration file for
golangci-lint v2 with golangci-lint v1"), so the CI lint job would fail
until it installs a 2.x release, and 2.12.2 reports 8 staticcheck issues
with the file golangci-lint migrate writes.

TestDocsLintCommandRunsTheGolangciLintReleaseTheConfigIsWrittenFor fails
when the Makefile pins no release, when the pinned major version differs
from the format of .golangci.yml, or when the Makefile, README.md,
CONTRIBUTING.md or a page under docs has a golangci-lint run command that
does not name the pinned release. On the tree before this change it
reports the missing pin, Makefile:38, CONTRIBUTING.md:46, 55 and 165 and
docs/development.md:26, and it passes after. TestGolangciLintProblems
checks those rules on sample configurations, Makefiles and docs.

Refs #61
Remaining: pin the CI lint job's golangci-lint version in .github/workflows/ci.yml, or move .golangci.yml to the v2 format together with a golangci-lint-action release that installs 2.x.
@thebenignhacker
thebenignhacker merged commit deb89e1 into main Oct 18, 2026
3 checks passed
@thebenignhacker
thebenignhacker deleted the integrate/2026-10-18-r3 branch October 18, 2026 02:46
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