Skip to content

ci(tests): migrate to golangci-lint v2#6380

Merged
dwisiswant0 merged 2 commits intodevfrom
dwisiswant0/ci/tests/migrate-to-golangci-lint-v2
Aug 16, 2025
Merged

ci(tests): migrate to golangci-lint v2#6380
dwisiswant0 merged 2 commits intodevfrom
dwisiswant0/ci/tests/migrate-to-golangci-lint-v2

Conversation

@dwisiswant0
Copy link
Member

@dwisiswant0 dwisiswant0 commented Aug 12, 2025

Proposed changes

Closes #6325

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Summary by CodeRabbit

  • Refactor

    • Minor internal cleanups to error handling and type usage. No changes to behavior or functionality.
  • Style

    • Code consistency improvements to align with existing conventions.
  • Chores

    • General maintenance updates with no user-facing impact.

No user-visible changes in this release.

Signed-off-by: Dwi Siswanto <git@dw1.io>
Signed-off-by: Dwi Siswanto <git@dw1.io>
@dwisiswant0 dwisiswant0 requested a review from ehsandeep August 12, 2025 15:41
@auto-assign auto-assign bot requested a review from dogancanbakir August 12, 2025 15:41
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Walkthrough

Minor code style updates: adjust error discard in Browser.Close to use blank identifier and remove explicit type on transport variable in Linear tracker to use inferred type. No changes to control flow, exported APIs, or functionality.

Changes

Cohort / File(s) Summary
Headless engine cleanup
pkg/protocols/headless/engine/engine.go
In Browser.Close, assign os.RemoveAll result to blank identifier (_) to satisfy linters; behavior unchanged.
Linear tracker transport typing
pkg/reporting/trackers/linear/linear.go
Replace explicit http.RoundTripper type with inferred type for transport; usage unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Assessment against linked issues

Objective Addressed Explanation
Migrate to golangci-lint v2 (#6325) Code aligns with lint expectations, but migration steps/configuration are not shown.

Poem

I tidied my burrow with nibbles and care,
A lint-breeze blew softly—no warnings to spare.
I tucked errors under a whiskery shrug,
Let types infer gently, warm as a hug.
Now logs hop cleaner across meadowed air—
Commit by commit, I groom my code-hair. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dwisiswant0/ci/tests/migrate-to-golangci-lint-v2

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
pkg/reporting/trackers/linear/linear.go (1)

57-57: Prefer short variable declaration (idiomatic Go).

No functional change, but := is more idiomatic for local vars and keeps the intent crisp.

-	var transport = http.DefaultTransport
+	transport := http.DefaultTransport
pkg/protocols/headless/engine/engine.go (1)

150-150: Handle cleanup error explicitly (even if you decide to ignore).

Assigning to the blank identifier obscures intent. Use an explicit short if to make the “best-effort cleanup” clear. This satisfies linters while keeping readability.

-	_ = os.RemoveAll(b.tempDir)
+	if err := os.RemoveAll(b.tempDir); err != nil {
+		// best-effort cleanup; safe to ignore
+	}

Alternatively, if you truly want to keep it silent and your linter config requires, add a //nolint:errcheck with a short rationale.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ef3662 and 6af1093.

⛔ Files ignored due to path filters (1)
  • .github/workflows/tests.yaml is excluded by !**/*.yaml
📒 Files selected for processing (2)
  • pkg/protocols/headless/engine/engine.go (1 hunks)
  • pkg/reporting/trackers/linear/linear.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Lint

@dogancanbakir
Copy link
Member

test fails

@dwisiswant0
Copy link
Member Author

test fails

unrelated.

@dwisiswant0 dwisiswant0 merged commit 9fcacd0 into dev Aug 16, 2025
38 of 45 checks passed
@dwisiswant0 dwisiswant0 deleted the dwisiswant0/ci/tests/migrate-to-golangci-lint-v2 branch August 16, 2025 06:20
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.

[MAINTENANCE] Migrate to golangci-lint v2

2 participants