Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: malformed log messages #2452

Merged
merged 3 commits into from
Feb 23, 2025
Merged

fix: malformed log messages #2452

merged 3 commits into from
Feb 23, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented Feb 23, 2025

Fixes #2451

@ldez ldez added this to the unreleased milestone Feb 23, 2025
@ldez ldez requested a review from dmke February 23, 2025 15:57
@ldez ldez added the area/log label Feb 23, 2025
@ldez ldez changed the title fix: log messages fix: malformed log messages Feb 23, 2025
Copy link
Member

@dmke dmke left a comment

Choose a reason for hiding this comment

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

I believe Go 1.24 (or more likely the recent gopls release, not 100% sure) has a diagnostic which can identify printf-like call sites.

That would have been a valuable tool when extracting the flags into constants :)

@dmke
Copy link
Member

dmke commented Feb 23, 2025

has a diagnostic which can identify printf-like call sites

I might have mixed this up with "UX improvements to format strings" in gopls 0.19.0...

@ldez
Copy link
Member Author

ldez commented Feb 23, 2025

Maybe you were thinking about: https://go.dev/doc/go1.24#vet

printf -> https://github.com/golang/tools/blob/master/go/analysis/passes/printf/doc.go

Inside Go, go vet embeds of copy of x/tools passes, golangci-lint uses x/tools directly.

@ldez ldez merged commit f1afe52 into go-acme:master Feb 23, 2025
7 checks passed
@ldez ldez deleted the fix/log branch February 23, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

cli: malformed log messages
2 participants