Skip to content

Update golangci-lint action to v9#42

Merged
ReneWerner87 merged 3 commits intomainfrom
codex/2025-11-21-09-48-00
Nov 21, 2025
Merged

Update golangci-lint action to v9#42
ReneWerner87 merged 3 commits intomainfrom
codex/2025-11-21-09-48-00

Conversation

@ReneWerner87
Copy link
Member

@ReneWerner87 ReneWerner87 commented Nov 21, 2025

Summary

  • update the GitHub Actions workflow to golangci-lint-action v9 while keeping the linter binary at v2.6.2

Testing

  • make lint
  • go test ./...

Codex Task

Summary by CodeRabbit

  • Chores

    • Updated code linting tool to a newer version for improved analysis and consistency.
  • Tests

    • Refactored test implementation patterns to improve code organization and maintainability.

✏️ Tip: You can customize this high-level summary in your review settings.

@ReneWerner87 ReneWerner87 requested a review from a team as a code owner November 21, 2025 09:48
@ReneWerner87 ReneWerner87 requested review from efectn, gaby and sixcolors and removed request for a team November 21, 2025 09:48
@gemini-code-assist
Copy link

Summary of Changes

Hello @ReneWerner87, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the project's code quality and CI/CD pipeline by upgrading the golangci-lint GitHub Action and its underlying linter binary. It introduces a dedicated configuration file for the linter and includes minor code adjustments to align with the updated linting standards, ensuring a more robust and consistent codebase.

Highlights

  • Linter Action Update: The GitHub Actions workflow for golangci-lint has been updated to version 9.
  • Linter Binary Version: The golangci-lint binary used in the Makefile's lint target has been upgraded from v1.62.2 to v2.6.2.
  • Linter Configuration: A new .golangci.yml file has been added to configure the golangci-lint tool, specifying Go version 1.24 and other run parameters.
  • Test Code Refactoring: Minor refactorings were applied to decoder_test.go to align with new linter rules, including introducing local variables for embedded structs and correcting field access paths in assertions.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/linter.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated golangci-lint from v1.62.2 to v2.6.2 with a new module path in the Makefile. Refactored decoder_test.go to access embedded struct fields through intermediate local aliases instead of direct promoted field access in two test functions.

Changes

Cohort / File(s) Summary
Linter Tool Upgrade
Makefile
Updated golangci-lint invocation from v1.62.2 to v2.6.2; changed module path from github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 to github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.2
Test Embedded Field Access Refactoring
decoder_test.go
Refactored TestAnonymousStructField and TestComprehensiveDecodingErrors to access embedded struct fields through intermediate local variable aliases (e.g., embedded := a.AS1; embedded.A) instead of direct promoted field paths; updated corresponding error message assertions

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify golangci-lint v2.6.2 binary path and configuration compatibility with the new module structure
  • Confirm test refactoring doesn't alter test semantics—assertions should remain logically equivalent despite the access pattern change

Possibly related PRs

Poem

🐰 A lint tool ascends to version two,
Tests refactor their embedded view,
Through aliases, fields come alive,
Cleaner assertions help us thrive!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions updating golangci-lint action to v9, but the actual changes involve updating the golangci-lint binary version from v1.62.2 to v2.6.2 in the Makefile, plus test refactoring. The title is misleading about the primary technical change. Revise the title to accurately reflect the main change, such as 'Update golangci-lint binary to v2.6.2 and refactor decoder tests' or similar, to better represent the actual changeset.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/2025-11-21-09-48-00

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e4d0470 and 0ab486b.

⛔ Files ignored due to path filters (2)
  • .github/workflows/linter.yml is excluded by !**/*.yml
  • .golangci.yml is excluded by !**/*.yml
📒 Files selected for processing (2)
  • Makefile (1 hunks)
  • decoder_test.go (3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-12-13T08:14:22.851Z
Learnt from: efectn
Repo: gofiber/fiber PR: 3162
File: hooks_test.go:228-228
Timestamp: 2024-12-13T08:14:22.851Z
Learning: In Go test files, prefer using the `require` methods from the `testify` package for assertions instead of manual comparisons and calls to `t.Fatal` or `t.Fatalf`.

Applied to files:

  • decoder_test.go
📚 Learning: 2025-09-03T12:18:29.841Z
Learnt from: CR
Repo: gofiber/cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-03T12:18:29.841Z
Learning: Always run `make lint`

Applied to files:

  • Makefile
📚 Learning: 2025-09-03T12:18:29.841Z
Learnt from: CR
Repo: gofiber/cli PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-09-03T12:18:29.841Z
Learning: Use the Makefile commands for common tasks (e.g., `make lint`, `make test`)

Applied to files:

  • Makefile
🔇 Additional comments (2)
decoder_test.go (2)

1717-1723: LGTM! Test refactored for clarity.

Using an intermediate embedded variable to access fields from the embedded struct makes the test more explicit and readable.


1756-1758: LGTM! Inline variable pattern is clear.

The inline declaration pattern for accessing the embedded struct field is concise and maintains readability.


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 and usage tips.

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.96%. Comparing base (e4d0470) to head (0c99dea).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage   96.96%   96.96%           
=======================================
  Files           4        4           
  Lines         758      758           
=======================================
  Hits          735      735           
  Misses         12       12           
  Partials       11       11           
Flag Coverage Δ
unittests 96.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates golangci-lint and its configuration. A new .golangci.yml file is added, and the Makefile is updated to use a new version of the linter. The changes in decoder_test.go appear to be refactorings to satisfy the updated linter, which is good.

However, I've found a critical issue in the Makefile where the command to run golangci-lint uses an invalid module path, which will cause the make lint command to fail. I've also pointed out a couple of minor inconsistencies in test error messages in decoder_test.go that should be addressed for better clarity.

@ReneWerner87 ReneWerner87 merged commit db61134 into main Nov 21, 2025
10 checks passed
@ReneWerner87 ReneWerner87 deleted the codex/2025-11-21-09-48-00 branch November 21, 2025 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant