1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-01 03:57:15 +00:00

Disable RuboCop offense Performance/Sum in IssueFieldsRows#to_html (#38146).

git-svn-id: https://svn.redmine.org/redmine/trunk@22034 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2023-01-11 13:36:36 +00:00
parent e010d90207
commit 7cf89bf44e
2 changed files with 2 additions and 6 deletions

View 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

View 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