Skip to content

ci: run CI on Go 1.26 with golangci-lint v2 - #14

Merged
dmakarenko merged 1 commit into
goodnotesfrom
kratos-ci-go126-lint-v2-20260930
Sep 30, 2026
Merged

dmakarenko merged 1 commit into
goodnotesfrom
kratos-ci-go126-lint-v2-20260930

Conversation

@dmakarenko

Copy link
Copy Markdown
Collaborator

Runs CI on Go 1.26 (the release toolchain) with golangci-lint v2.14.0 (action v9, v2 .golangci.yml based on upstream Ory, gosec G115/G710 excluded), with 4 code fixes and 8 //nolint lines that each give a reason.

Why: golangci-lint v1.59.1 cannot type-check on Go 1.26, and the release image (#11) builds with Go 1.26, which CI did not test. Merge after #13: until then lint reports the G107 http.Get that #13 deletes.

Tested: golangci-lint v2.14.0 on Go 1.26 reports only that G107 finding. go build ./... passes. hash, request, schema, x and driver/config give 379 pass / 0 fail / 0 skip.

https://claude.ai/code/session_0192dFsdvVuQdqMdVxi9HDkz

Go in CI: 1.22 -> 1.26 (three jobs). golangci-lint: v1.59.1 -> v2.14.0.
golangci-lint-action: v6 -> v9. The go directive in go.mod stays 1.22.

The config moves to the v2 format. It keeps the goimports local prefix
github.com/ory, the test-file exclusions, and the SA1019 exclusion.
It uses the v2 exclusion presets that replace the v1 default exclusions.
It excludes the gosec rules that upstream Ory excludes, and also G115
and G710. It turns off the staticcheck QF quick-fix checks that v1 did
not run.

Findings: 4 fixed in code (2 len() nil checks, reflect.Pointer, unused
fetchOpenIdConfiguration), 8 marked with nolint and a reason (G703, G407,
G602, G124), 1 existing nolint widened (md4 import, G506).
One finding remains in selfservice/strategy/oidc/provider_microsoft.go.

Claude-Session: https://claude.ai/code/session_0192dFsdvVuQdqMdVxi9HDkz
@dmakarenko
dmakarenko force-pushed the kratos-ci-go126-lint-v2-20260930 branch from ab9b2a7 to 78c499e Compare September 30, 2026 21:28
@dmakarenko
dmakarenko merged commit 8838b2e into goodnotes Sep 30, 2026
2 checks passed
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