From c2b30f5d3d17369b35a4945da98eb5ae5a3b1a94 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 20 Jun 2019 12:15:28 +0000 Subject: [PATCH] Code cleanup: RuboCop: Style/DefWithParentheses git-svn-id: http://svn.redmine.org/redmine/trunk@18290 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 8 -------- app/helpers/issues_helper.rb | 2 +- app/helpers/sort_helper.rb | 2 +- lib/redmine/scm/adapters/cvs_adapter.rb | 2 +- lib/redmine/unified_diff.rb | 2 +- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a2dedd51b..170f02ea4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1444,14 +1444,6 @@ Style/CommentedKeyword: Style/ConditionalAssignment: Enabled: false -# Offense count: 3 -# Cop supports --auto-correct. -Style/DefWithParentheses: - Exclude: - - 'app/helpers/sort_helper.rb' - - 'lib/redmine/scm/adapters/cvs_adapter.rb' - - 'lib/redmine/unified_diff.rb' - # Offense count: 626 Style/Documentation: Enabled: false diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index f96a3a783..5c2957c4f 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -551,7 +551,7 @@ module IssuesHelper end # Issue history tabs - def issue_history_tabs() + def issue_history_tabs tabs = [] if @journals.present? journals_without_notes = @journals.select{|value| value.notes.blank?} diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index ab0065993..5350774b2 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -96,7 +96,7 @@ module SortHelper # Returns an SQL sort clause corresponding to the current sort state. # Use this to sort the controller's table items collection. # - def sort_clause() + def sort_clause @sort_criteria.sort_clause(@sortable_columns) end diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index f0f4d54df..ff642054e 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -445,7 +445,7 @@ module Redmine end # Interpretiert die cvs revisionsnummern wie z.b. 1.14 oder 1.3.0.15 - def parseRevision() + def parseRevision pieces = @complete_rev.split(".") @revision = pieces.last.to_i baseSize = 1 diff --git a/lib/redmine/unified_diff.rb b/lib/redmine/unified_diff.rb index 697d7c525..5660fa91d 100644 --- a/lib/redmine/unified_diff.rb +++ b/lib/redmine/unified_diff.rb @@ -227,7 +227,7 @@ module Redmine attr_accessor :type_diff_left attr_accessor :offsets - def initialize() + def initialize self.nb_line_left = '' self.nb_line_right = '' self.line_left = '' -- 2.39.5