]> source.dussan.org Git - redmine.git/commitdiff
Disable RuboCop offense Performance/Sum in IssueFieldsRows#to_html (#38146).
authorGo MAEDA <maeda@farend.jp>
Wed, 11 Jan 2023 13:36:36 +0000 (13:36 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 11 Jan 2023 13:36:36 +0000 (13:36 +0000)
git-svn-id: https://svn.redmine.org/redmine/trunk@22034 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
app/helpers/issues_helper.rb

index 9ff640eb4ba95c978ec0968ced1b82a41dbca80b..f4444f78d13ff677581c4fbecb8afbd088bc3fc9 100644 (file)
@@ -486,12 +486,6 @@ Naming/VariableNumber:
     - 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb'
     - 'test/unit/project_test.rb'
 
-# This cop supports unsafe autocorrection (--autocorrect-all).
-# Configuration parameters: OnlySumOrWithInitialValue.
-Performance/Sum:
-  Exclude:
-    - 'app/helpers/issues_helper.rb'
-
 # This cop supports safe autocorrection (--autocorrect).
 # Configuration parameters: Include.
 # Include: app/models/**/*.rb
index 98fe053099c2436c09f922e998d352c912a66597..ed041d1451076b2327ed50dc3d68a1a8c931e239 100644 (file)
@@ -343,9 +343,11 @@ module IssuesHelper
     end
 
     def to_html
+      # rubocop:disable Performance/Sum
       content =
         content_tag('div', @left.reduce(&:+), :class => 'splitcontentleft') +
         content_tag('div', @right.reduce(&:+), :class => 'splitcontentleft')
+      # rubocop:enable Performance/Sum
 
       content_tag('div', content, :class => 'splitcontent')
     end