Skip to content

fix: apply golangci-lint v2.10.1 auto-fixes#252

Merged
peteski22 merged 2 commits intomainfrom
fix/golangci-lint-v2.10.1-fixes
Mar 2, 2026
Merged

fix: apply golangci-lint v2.10.1 auto-fixes#252
peteski22 merged 2 commits intomainfrom
fix/golangci-lint-v2.10.1-fixes

Conversation

@peteski22
Copy link
Contributor

@peteski22 peteski22 commented Mar 2, 2026

Summary

  • Apply golines line-length formatting fixes across several files
  • Replace WriteString(fmt.Sprintf(...)) with fmt.Fprintf(...) per gosimple suggestions

These issues were caught by upgrading golangci-lint from v2.4.0 to v2.10.1. The previous version was not flagging these.

Test plan

  • go test ./... passes
  • golangci-lint run passes with v2.10.1

Summary by CodeRabbit

  • Style
    • Refactored internal code formatting across configuration and daemon modules for improved consistency and maintainability. Changes include optimised formatting calls with no impact on functionality or user experience.

Apply golines line-length fixes and gosimple suggestions
(WriteString+Sprintf replaced with Fprintf) that were caught
by upgrading golangci-lint from v2.4.0 to v2.10.1.
@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d76fd49 and c5fbc54.

📒 Files selected for processing (7)
  • cmd/config/args/remove.go
  • cmd/config/args/set.go
  • cmd/config/env/remove.go
  • cmd/config/env/set.go
  • cmd/daemon.go
  • internal/config/daemon_config.go
  • internal/printer/server_printer.go

Walkthrough

The pull request comprises formatting refactors and string-handling optimizations across configuration and daemon management code. Changes include reformatting print statements across multiple lines for readability and replacing string builder patterns from WriteString(fmt.Sprintf(...)) to direct fmt.Fprintf calls for efficiency. No functional behaviour is altered.

Changes

Cohort / File(s) Summary
Configuration Args and Env Modules
cmd/config/args/remove.go, cmd/config/args/set.go, cmd/config/env/remove.go, cmd/config/env/set.go
Reformatting of fmt.Fprintf calls across multiple lines for improved readability. Format strings and arguments remain semantically identical with no logic or control flow changes.
String Builder Optimizations
cmd/daemon.go, internal/printer/server_printer.go
Replacement of WriteString(fmt.Sprintf(...)) patterns with direct fmt.Fprintf calls to builders for more efficient string writing. No functional changes to output or error handling.
Configuration Validation Formatting
internal/config/daemon_config.go
Minor reformatting of error append statement within validation logic. Semantic behaviour unchanged.

Suggested reviewers

  • javiermtorres
  • aittalam
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: applying golangci-lint v2.10.1 auto-fixes to the codebase, which encompasses all file-level changes including formatting and pattern replacements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/golangci-lint-v2.10.1-fixes

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.

@peteski22 peteski22 requested a review from javiermtorres March 2, 2026 20:22
@peteski22 peteski22 merged commit 74145dd into main Mar 2, 2026
3 checks passed
@peteski22 peteski22 deleted the fix/golangci-lint-v2.10.1-fixes branch March 2, 2026 22:00
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.

2 participants