summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-08-04 17:05:24 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-08-04 17:05:24 +0000
commit118fff34aa5d16aaf493447566bc930a1cf40325 (patch)
treef5c9f2ab10077d06dca9450f1a001bed3f9f36dd
parent44cbd0eaa99ce5a1c34df206162d6d940e87d210 (diff)
downloadredmine-118fff34aa5d16aaf493447566bc930a1cf40325.tar.gz
redmine-118fff34aa5d16aaf493447566bc930a1cf40325.zip
rubocop: fix Style/YodaCondition of lib/redmine/scm/adapters/abstract_adapter.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18351 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml7
-rw-r--r--lib/redmine/scm/adapters/abstract_adapter.rb4
2 files changed, 2 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index b1f11b93d..e3abaef8a 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1867,13 +1867,6 @@ Style/WordArray:
Enabled: false
# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
-Style/YodaCondition:
- Exclude:
- - 'lib/redmine/scm/adapters/abstract_adapter.rb'
-
-# Cop supports --auto-correct.
Style/ZeroLengthPredicate:
Exclude:
- 'app/models/import.rb'
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb
index ccd993bd5..83d41c22a 100644
--- a/lib/redmine/scm/adapters/abstract_adapter.rb
+++ b/lib/redmine/scm/adapters/abstract_adapter.rb
@@ -329,11 +329,11 @@ module Redmine
end
def is_file?
- 'file' == self.kind
+ self.kind == 'file'
end
def is_dir?
- 'dir' == self.kind
+ self.kind == 'dir'
end
def is_text?