Skip to content

fix: do not directly use error messages as format strings#122

Merged
satta merged 1 commit into
masterfrom
safe-fatalf
Nov 20, 2025
Merged

fix: do not directly use error messages as format strings#122
satta merged 1 commit into
masterfrom
safe-fatalf

Conversation

@satta

@satta satta commented Nov 20, 2025

Copy link
Copy Markdown
Member

Go 1.24's vet tool has improved its analyzer. It now reports a diagnostic for calls like t.Fatalf(s) where s is a non-constant format string and no additional arguments are provided. This change ensures that potential misuse of dynamic format strings is caught, preventing unexpected behavior or errors caused by unintended format specifiers.

This leads to test failures like https://github.com/DCSO/fever/actions/runs/19523474174/job/55891350355#step:7:21

Go 1.24's vet tool has improved its analyzer. It now reports a
diagnostic for calls like t.Fatalf(s) where s is a non-constant format
string and no additional arguments are provided. This change ensures
that potential misuse of dynamic format strings is caught, preventing
unexpected behavior or errors caused by unintended format specifiers.
@satta satta requested review from 0mbi and fhonza November 20, 2025 09:51
@satta satta merged commit 833ee80 into master Nov 20, 2025
5 checks passed
@satta satta deleted the safe-fatalf branch November 20, 2025 10:29
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