diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-10-20 22:21:19 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-10-20 22:21:19 +0000 |
commit | 0dd9fbb806effd44327f9945542c1d05ef8544c1 (patch) | |
tree | e2f7005643283464671540596a1b80b4212a4602 | |
parent | 7125fd70cebea60b4e692c33b37bd0ea71c6ffbf (diff) | |
download | redmine-0dd9fbb806effd44327f9945542c1d05ef8544c1.tar.gz redmine-0dd9fbb806effd44327f9945542c1d05ef8544c1.zip |
Update .rubocop_todo and fix Style/AndOr offense (#29914, #32938).
git-svn-id: http://svn.redmine.org/redmine/trunk@21253 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | .rubocop_todo.yml | 7 | ||||
-rw-r--r-- | lib/redmine/wiki_formatting/links_helper.rb | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 114509d29..4ca32dcd0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1070,7 +1070,6 @@ Style/AndOr: - 'lib/redmine/scm/adapters/filesystem_adapter.rb' - 'lib/redmine/scm/adapters/git_adapter.rb' - 'lib/redmine/scm/adapters/subversion_adapter.rb' - - 'lib/redmine/wiki_formatting.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' # Cop supports --auto-correct. @@ -1399,7 +1398,7 @@ Style/MultilineIfModifier: - 'app/models/time_entry_query.rb' - 'app/views/common/feed.atom.builder' - 'lib/redmine/helpers/gantt.rb' - - 'lib/redmine/wiki_formatting.rb' + - 'lib/redmine/wiki_formatting/links_helper.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' # Cop supports --auto-correct. @@ -1615,7 +1614,7 @@ Style/RedundantInterpolation: - 'app/views/journals/index.builder' - 'lib/redmine/helpers/time_report.rb' - 'lib/redmine/scm/adapters/subversion_adapter.rb' - - 'lib/redmine/wiki_formatting.rb' + - 'lib/redmine/wiki_formatting/links_helper.rb' - 'test/functional/versions_controller_test.rb' - 'test/functional/watchers_controller_test.rb' @@ -1791,7 +1790,7 @@ Style/StringLiteralsInInterpolation: - 'app/models/issue_query.rb' - 'config/environment.rb' - 'lib/redmine/scm/adapters/cvs_adapter.rb' - - 'lib/redmine/wiki_formatting.rb' + - 'lib/redmine/wiki_formatting/links_helper.rb' - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - 'test/unit/member_test.rb' diff --git a/lib/redmine/wiki_formatting/links_helper.rb b/lib/redmine/wiki_formatting/links_helper.rb index 2e057df3e..a9c902b7d 100644 --- a/lib/redmine/wiki_formatting/links_helper.rb +++ b/lib/redmine/wiki_formatting/links_helper.rb @@ -52,7 +52,7 @@ module Redmine else # Idea below : an URL with unbalanced parenthesis and # ending by ')' is put into external parenthesis - if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0) + if url[-1] == ")" && ((url.count("(") - url.count(")")) < 0) url = url[0..-2] # discard closing parenthesis from url post = ")" + post # add closing parenthesis to post end |