You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The format(...) invocations are equivalent, yet the latter causes an offense:
... W: Lint/FormatParameterMismatch: Format string is invalid because formatting sequence types (numbered, named or unnumbered) are mixed.
puts format("%#{padding}s: %s", prefix, message)
^^^^^^
The text was updated successfully, but these errors were encountered:
zor-el
changed the title
Yet another Lint/FormatParameterMismatch interpolation-related false positive
Yet another Lint/FormatParameterMismatch false positive related to string interpolation
Feb 4, 2024
Lint/FormatParameterMismatch: Number of arguments (2) to `sprintf` doesn't match the number of fields (1).
Version: 1.57.2 - old I know, but since this is an open issue, I'm posting it to show another example of the failure, which is probably the same regardless of version.
A similar issue (#11521) appears to have been addressed, but it didn't seem to cover this type of case:
The
format(...)
invocations are equivalent, yet the latter causes an offense:Expected behavior
No Lint/FormatParameterMismatch offense reported.
Actual behavior
See above
Steps to reproduce the problem
See above
RuboCop version
Tested with:
The text was updated successfully, but these errors were encountered: