From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:54:12 +0000 (+0000) Subject: code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/project.rb X-Git-Tag: 4.1.0~271 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=790d2bae705fa5762c7cc520c78d927e8a5afea6;p=redmine.git code cleanup: rubocop: fix Style/ParenthesesAroundCondition in app/models/project.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18832 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 08218813f..23a4db637 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1143,7 +1143,6 @@ Style/ParallelAssignment: # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: - - 'app/models/project.rb' - 'app/models/query.rb' - 'app/models/repository/subversion.rb' - 'app/models/time_entry.rb' diff --git a/app/models/project.rb b/app/models/project.rb index 948eac1f8..9568a5b85 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -868,8 +868,8 @@ class Project < ActiveRecord::Base ancestors = projects.first.ancestors.to_a end projects.sort_by(&:lft).each do |project| - while (ancestors.any? && - !project.is_descendant_of?(ancestors.last)) + while ancestors.any? && + !project.is_descendant_of?(ancestors.last) ancestors.pop end yield project, ancestors.size