Skip to content

chore: upgrade golangci-lint to 2.12.2#729

Merged
curfew-marathon merged 1 commit into
mainfrom
chore/upgrade-golangci-lint-2.12.2
Jul 23, 2026
Merged

chore: upgrade golangci-lint to 2.12.2#729
curfew-marathon merged 1 commit into
mainfrom
chore/upgrade-golangci-lint-2.12.2

Conversation

@curfew-marathon

@curfew-marathon curfew-marathon commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades golangci-lint from v2.10.1 → v2.12.2 and resolves the new findings the upgrade surfaces, so CI stays green.

Changes

Version bump (local + CI kept in lockstep):

  • .github/workflows/main.yaml: golangci-lint-action linter version: v2.10.1 → v2.12.2 (the action pin itself, @ba0d7d2… # v9.3.0, is already latest — unchanged).
  • Makefile: pin the golangci-lint install to @v2.12.2 (was @latest), so local make lint matches CI exactly.

New findings cleared (all pre-existing; surfaced only by the newer linter):

  • goconst (50) — disabled repo-wide in .golangci.yaml. All 50 were repeated string literals in *_test.go fixtures, where extracting shared constants tends to hurt table-test readability more than it helps.
  • nolintlint (4) — removed 4 //nolint directives that v2.12.2 correctly reports as unused (the linters they suppressed no longer fire on those lines):
    • internal/fga/fga.go: //nolint:gosec on APIToken and ClientSecret — verified gosec no longer flags these fields.
    • internal/build/build.go: //nolint:revive on the package clause.
    • internal/utils/context.go: //nolint:revive on the package clause.

Verification

golangci-lint run -c .golangci.yaml ./... at v2.12.20 issues. The version bump and the source cleanups are intentionally in one commit: the removed directives are still live at v2.10.1, so the two are inseparable for a green CI.

@curfew-marathon
curfew-marathon requested a review from a team as a code owner July 23, 2026 20:46
Copilot AI review requested due to automatic review settings July 23, 2026 20:46
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR updates golangci-lint to v2.12.2 in CI and local installation, disables goconst, and removes selected revive and gosec suppression comments.

Changes

Lint configuration alignment

Layer / File(s) Summary
Pin and configure lint tooling
.github/workflows/main.yaml, .golangci.yaml, Makefile
CI and local installation use golangci-lint v2.12.2, and goconst is disabled.
Remove lint suppressions
internal/build/build.go, internal/fga/fga.go, internal/utils/context.go
Selected revive and gosec suppression comments are removed without changing the associated declarations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: upgrading golangci-lint to 2.12.2.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/upgrade-golangci-lint-2.12.2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s linting toolchain to golangci-lint v2.12.2 (CI + local) and adjusts configuration/source annotations so the upgraded linter remains clean and CI stays green.

Changes:

  • Bump CI golangci-lint version to v2.12.2 and pin the local make lint installer to the same version.
  • Disable goconst at the repo level to avoid new findings introduced by the upgrade.
  • Remove now-unused //nolint directives surfaced by nolintlint.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Makefile Pins local go install of golangci-lint to v2.12.2 to match CI.
internal/utils/context.go Removes an unused //nolint:revive directive on the package clause.
internal/fga/fga.go Removes unused //nolint:gosec suppressions on config fields.
internal/build/build.go Removes an unused //nolint:revive directive near the package clause.
.golangci.yaml Adds goconst to the disabled linters list under default: all.
.github/workflows/main.yaml Updates golangci-lint-action linter version to v2.12.2.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@curfew-marathon
curfew-marathon added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit cba848d Jul 23, 2026
30 checks passed
@curfew-marathon
curfew-marathon deleted the chore/upgrade-golangci-lint-2.12.2 branch July 23, 2026 21:24
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.

3 participants