We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Rubocop sees Style/FormatStringToken in escaped % sign.
Style/FormatStringToken
%
format '%<hit_rate>6.2f%%', hit_rate: 12.34 # => " 12.34%"
Rubocop must not recognize Style/FormatStringToken offense here.
Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over unannotated tokens (like %s). format '%<hit_rate>6.2f%%', hit_rate: hit_rate ^^
Use provided code sample.
$ [bundle exec] rubocop -V 0.75.1 (using Parser 2.6.5.0, running on ruby 2.6.1 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
Thanks for the report! I am taking of this.
Sorry, something went wrong.
[Fix rubocop#7439] Ignore percent escapes
8264e32
`%%` is technically a format sequence in the `unannotated` style. But it cannot be written in another style in a sensible way.
Merge pull request #7440 from buehmann/format-string/percent/7439
6ce4f5a
[Fix #7439] Ignore percent escapes
Successfully merging a pull request may close this issue.
Rubocop sees
Style/FormatStringToken
in escaped%
sign.Expected behavior
Rubocop must not recognize
Style/FormatStringToken
offense here.Actual behavior
Steps to reproduce the problem
Use provided code sample.
RuboCop version
The text was updated successfully, but these errors were encountered: