From 1cc116eeb57b7c6ee8c516c52be2845df2452f4e Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Mon, 2 Jan 2023 17:53:12 +0900 Subject: [PATCH 3/9] Fix RuboCop offense Performance/CollectionLiteralInLoop --- .rubocop.yml | 3 +++ .rubocop_todo.yml | 20 -------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d411d2a9a..3baa592f2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -116,6 +116,9 @@ Naming/BinaryOperatorParameterName: Naming/PredicateName: Enabled: false +Performance/CollectionLiteralInLoop: + MinSize: 4 + Rails/ActionControllerFlashBeforeRender: # False positive in actions where `redirect_to_referer_or` is used Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2576c467b..2ed0864d4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -486,26 +486,6 @@ Naming/VariableNumber: - 'test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb' - 'test/unit/project_test.rb' -# Configuration parameters: MinSize. -Performance/CollectionLiteralInLoop: - Exclude: - - 'app/helpers/imports_helper.rb' - - 'app/helpers/queries_helper.rb' - - 'app/helpers/settings_helper.rb' - - 'app/helpers/timelog_helper.rb' - - 'app/models/issue.rb' - - 'app/models/workflow_transition.rb' - - 'lib/redmine/helpers/time_report.rb' - - 'lib/redmine/scm/adapters/filesystem_adapter.rb' - - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - - 'test/functional/issues_custom_fields_visibility_test.rb' - - 'test/functional/repositories_git_controller_test.rb' - - 'test/functional/repositories_mercurial_controller_test.rb' - - 'test/functional/timelog_custom_fields_visibility_test.rb' - - 'test/unit/lib/redmine/scm/adapters/git_adapter_test.rb' - - 'test/unit/repository_git_test.rb' - - 'test/unit/repository_mercurial_test.rb' - # This cop supports safe autocorrection (--autocorrect). Performance/ConstantRegexp: Exclude: -- 2.39.0