]> source.dussan.org Git - redmine.git/commitdiff
code cleanup: rubocop: fix Style/WhileUntilModifier in lib/redmine/unified_diff.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 11:15:54 +0000 (11:15 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 19 Oct 2019 11:15:54 +0000 (11:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18759 e93f8b46-1217-0410-a6f0-8f06a7374b81

.rubocop_todo.yml
lib/redmine/unified_diff.rb

index 2c379d0aee3a7b070b8a5f001d17653bb3ed07cd..008bb94d7f0aa6ac58e5971f1424b24e44eec6dd 100644 (file)
@@ -1446,7 +1446,6 @@ Style/VariableInterpolation:
 Style/WhileUntilModifier:
   Exclude:
     - 'app/models/attachment.rb'
-    - 'lib/redmine/unified_diff.rb'
     - 'lib/redmine/utils.rb'
 
 # Cop supports --auto-correct.
index 5660fa91d05040a4d69c1a64b1ef3e573bfa23e8..64e3f13e81483a47936961133be54e44091a083e 100644 (file)
@@ -203,11 +203,13 @@ module Redmine
       if line_left.present? && line_right.present? && line_left != line_right
         max = [line_left.size, line_right.size].min
         starting = 0
-        while starting < max && line_left[starting] == line_right[starting]
+        while starting < max &&
+                line_left[starting] == line_right[starting]
           starting += 1
         end
         ending = -1
-        while ending >= -(max - starting) && (line_left[ending] == line_right[ending])
+        while ending >= -(max - starting) &&
+               (line_left[ending] == line_right[ending])
           ending -= 1
         end
         unless starting == 0 && ending == -1