Skip to content

fix linting issues#36

Merged
fabpot merged 1 commit intosymfony-cli:mainfrom
tucksaun:fix-lint
Apr 1, 2026
Merged

fix linting issues#36
fabpot merged 1 commit intosymfony-cli:mainfrom
tucksaun:fix-lint

Conversation

@tucksaun
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 16:49
@tucksaun tucksaun self-assigned this Mar 31, 2026
@tucksaun tucksaun requested a review from fabpot March 31, 2026 16:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Go linting findings in the console flag utilities, focusing on simplifying string formatting in StringMap.String().

Changes:

  • Replaced buffer.WriteString(fmt.Sprintf(...)) with fmt.Fprintf(&buffer, ...) to satisfy linter guidance.

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

Comment on lines 187 to 189
for _, key := range keys {
buffer.WriteString(fmt.Sprintf(`"%s=%s", `, key, m.m[key]))
fmt.Fprintf(&buffer, `"%s=%s", `, key, m.m[key])
}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The raw string passed to fmt.Fprintf is now \"%s=%s\", , which will output literal backslashes (e.g., "key=value") instead of quoting with ". Since this is a raw string literal (backticks), the quotes don’t need escaping—use "%s=%s", without the backslashes to preserve the previous output format.

Copilot uses AI. Check for mistakes.
@fabpot fabpot merged commit 651b2d2 into symfony-cli:main Apr 1, 2026
15 checks passed
@tucksaun tucksaun deleted the fix-lint branch April 1, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants