Skip to content

Commit

Permalink
Fix an example for Style/FormatStringToken
Browse files Browse the repository at this point in the history
This PR fixes an example for `Style/FormatStringToken`.
It seems that kwarg to `format` method has been forgotten.
  • Loading branch information
koic committed Oct 7, 2020
1 parent d4ce6ce commit d3f08ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_style.adoc
Expand Up @@ -3405,7 +3405,7 @@ format('%{greeting}', greeting: 'Hello')
----
# bad
format('%<greeting>s', greeting: 'Hello')
format('%{greeting}', 'Hello')
format('%{greeting}', greeting: 'Hello')
# good
format('%s', 'Hello')
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/style/format_string_token.rb
Expand Up @@ -33,7 +33,7 @@ module Style
#
# # bad
# format('%<greeting>s', greeting: 'Hello')
# format('%{greeting}', 'Hello')
# format('%{greeting}', greeting: 'Hello')
#
# # good
# format('%s', 'Hello')
Expand Down

0 comments on commit d3f08ba

Please sign in to comment.