Skip to content

Commit 930584a

Browse files
committed
Suppress RuboCop's offense
This commit suppresses the following RuboCop's offense: ```console $ bundle exec rubocop (snip) lib/rubocop/cop/rails/eager_evaluation_log_message.rb:48:23: C: [Correctable] Style/RedundantFormat: Use MSG directly instead of format. message = format(MSG) ^^^^^^^^^^^ 301 files inspected, 1 offense detected, 1 offense autocorrectable ```
1 parent 8056bdc commit 930584a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/rubocop/cop/rails/eager_evaluation_log_message.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ def on_send(node)
4545
return if node.parent&.block_type?
4646

4747
interpolated_string_passed_to_debug(node) do |arguments|
48-
message = format(MSG)
49-
5048
range = replacement_range(node)
5149
replacement = replacement_source(node, arguments)
5250

53-
add_offense(range, message: message) do |corrector|
51+
add_offense(range) do |corrector|
5452
corrector.replace(range, replacement)
5553
end
5654
end

0 commit comments

Comments
 (0)