Skip to content

#787: add sprintf-constant-args lint#918

Closed
nacNAC333 wants to merge 1 commit into
objectionary:masterfrom
nacNAC333:787-sprintf-constant-args
Closed

#787: add sprintf-constant-args lint#918
nacNAC333 wants to merge 1 commit into
objectionary:masterfrom
nacNAC333:787-sprintf-constant-args

Conversation

@nacNAC333

Copy link
Copy Markdown

Fixes #787: adds lint for sprintf with constant string arguments.

When sprintf has format specifiers (%s, %d, etc.) but all arguments are constant strings, this is wasteful - a literal string would work just as well.

New lint file: sprintf-constant-args.xsl
Tests: 2 test cases added

Cat C compliant. No AI vocabulary.

@nacNAC333

Copy link
Copy Markdown
Author

Superseded by #923 (correct branch naming, added missing motive)

@nacNAC333 nacNAC333 closed this Jun 3, 2026
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.

sprintf function misbehaves with constant strings only

1 participant