-
Notifications
You must be signed in to change notification settings - Fork 37
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
Rule: sprintf-arguments-mismatch
#1009
Comments
It's annoying to fix this because we haven't specified what's OK and what is not, and the surface is just so large. But covering the 80% would certainly be useful. |
Yeah, good point! I'd say covering the "normal" cases is probably going to amount to somewhere closer to 99%... but perhaps people are more creative with Both "explicit argument indexes" (of which I learnt about just now), and |
sprintf-argument-mismatch
sprintf-arguments-mismatch
Fixes #1009 Signed-off-by: Anders Eknert <anders@styra.com>
Fixes StyraInc#1009 Signed-off-by: Anders Eknert <anders@styra.com>
If too many or too few arguments are in the array provided to
sprintf
, OPA will return the "error" back in the string created.It would be helpful if Regal did a count of the args in the string and compared it to the number of args in the array provided (if known), and flagged this as an issue.
The text was updated successfully, but these errors were encountered: