Repository navigation
Conversation
The module requires Go 1.26, so the go1.12 build constraint in version.go has no effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a value receiver, encoding/json uses MarshalJSON for both ReadResult values and pointers. For a nil pointer, encoding/json writes null, so the nil check is not necessary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lint job on main failed once with nolintlint errors for the //nolint:revive directives in cmd/geoipupdate/args.go. The next run passed with the same golangci-lint version (2.12.2). golangci-lint v2.12.2 uses revive v1.15.0. In that version, the epoch-naming and inefficient-map-lookup rules cannot type check a package that imports non-stdlib packages. They return an internal failure, and revive then skips all remaining rules for that file. golangci-lint drops the internal failure without a message. Revive runs the rules in random order, so deep-exit sometimes does not run on args.go. golangci-lint v2.15.0 uses revive v1.17.1, which logs the internal failure and continues with the other rules. This commit also makes these changes for v2.15.0: - Disable exhaustruct_v5, as we already disable exhaustruct. - Replace the deprecated gofumpt extra-rules setting with extra.group-params and extra.clothe-returns. - Add a gosec nolint directive for the user-specified *_FILE path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If a multi-line function call has its opening parenthesis at the end of a line, balance-calls requires the closing parenthesis at the start of a line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Lint settings and build selection .golangci.yml, cmd/geoipupdate/version.go, internal/geoipupdate/config.go |
The linter and formatter settings change. The go1.12 build constraint is removed, and a gosec suppression is added to a file-read call. |
Error and JSON method updates internal/errors.go, internal/geoipupdate/database/reader.go, internal/geoipupdate/geoip_updater_test.go |
IsRetryableError uses errors.AsType[HTTPError]. ReadResult.MarshalJSON changes to a value receiver and no longer checks for a nil pointer. The test fixture formatting changes without changing its JSON payload. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: oschwald, marselester
Merge Risk: 
Minimal · up to 0c5f1
-
The PR is mergeable with no concrete merge-blocking risk identified.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the linting lines,
Then hops past build tags, neat and fine.
A value receiver joins the play,
While errors take a clearer way.
The fixture rests, its bytes unchanged,
And carrots mark the code rearranged.
Comment @coderabbitai help to get the list of available commands.
Modver resultThis report was generated by Modver, This PR requires (at least) an increase in your module's patchlevel. |
There was a problem hiding this comment.
🟢 Approval recommended
The focused tooling and compatibility changes have no identified blocking issues and align with the repository’s Go 1.26 baseline.
No open issues 🎉
What changed in this PR
Updates golangci-lint to v2.15.0 to address intermittent revive results, with configuration and Go code adjustments required by the upgrade.
Changes:
- Updates lint tool versions, platform checksums, and configuration.
- Modernizes error handling and JSON marshaling, and removes a redundant build constraint.
- Enables gofumpt’s balanced-call formatting and reformats one test accordingly.
| File | Description |
|---|---|
mise.lock |
Pins golangci-lint v2.15.0 across supported platforms. |
internal/geoipupdate/geoip_updater_test.go |
Applies balanced-call formatting. |
internal/geoipupdate/database/reader.go |
Changes MarshalJSON to a value receiver. |
internal/geoipupdate/config.go |
Documents a gosec suppression for user-specified file paths. |
internal/errors.go |
Uses errors.AsType for retryable HTTP errors. |
cmd/geoipupdate/version.go |
Removes the redundant Go 1.12 build constraint. |
.golangci.yml |
Updates linter exclusions and gofumpt settings. |
Review effort: Balanced
The lint job on main failed once with nolintlint errors for the
//nolint:revivedirectives incmd/geoipupdate/args.go(run). The next run passed with the same golangci-lint version (2.12.2).Cause
golangci-lint v2.12.2 uses revive v1.15.0. In that version, the
epoch-namingandinefficient-map-lookuprules cannot type check a package that imports non-stdlib packages. They return an internal failure, and revive then skips all remaining rules for that file. golangci-lint drops the internal failure without a message. Revive runs the rules in random order, sodeep-exitsometimes does not run onargs.go.golangci-lint v2.15.0 uses revive v1.17.1, which logs the internal failure and continues with the other rules.
Changes
exhaustruct_v5, replaces the deprecated gofumptextra-rulessetting, and adds a gosecnolintdirective for the user-specified*_FILEpath. The upgrade cannot pass lint without these changes.go1.12build tag.errors.AsTypeinIsRetryableError.ReadResult.MarshalJSON. The--outputJSON does not change.balance-calls.Each commit passes lint and tests with the golangci-lint version that its
mise.lockpins.Linear: STF-2212
🤖 Generated with Claude Code
Summary by CodeRabbit