From 3cefc118c9d0746f51f0f9f107b355bdf38b3a1e Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 5 May 2015 15:23:45 +0200 Subject: [PATCH] Corrected with rubocop cop 'Style/MultilineOperationIndentation'. --- .rubocop.yml | 2 -- app/models/history.rb | 2 +- app/models/online_notification.rb | 4 ++-- lib/core_ext/string.rb | 2 +- lib/import/otrs2.rb | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index d6c72118d..a422d8f6a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -268,8 +268,6 @@ Lint/AmbiguousRegexpLiteral: Enabled: false Rails/Validation: Enabled: false -Style/MultilineOperationIndentation: - Enabled: false Lint/Eval: Enabled: false Style/ModuleFunction: diff --git a/app/models/history.rb b/app/models/history.rb index 65bca3295..9dfcf2c52 100644 --- a/app/models/history.rb +++ b/app/models/history.rb @@ -163,7 +163,7 @@ returns history_object_related.id, requested_object_id, ) - .order('created_at ASC, id ASC') + .order('created_at ASC, id ASC') # rubocop:disable Style/MultilineOperationIndentation end asset_list = {} list = [] diff --git a/app/models/online_notification.rb b/app/models/online_notification.rb index 53ad3a120..300535084 100644 --- a/app/models/online_notification.rb +++ b/app/models/online_notification.rb @@ -116,8 +116,8 @@ return all online notifications of an object object_lookup_id: object_id, o_id: o_id, ) - .order( 'created_at DESC, id DESC' ) - .limit( 10_000 ) + .order( 'created_at DESC, id DESC' ) # rubocop:disable Style/MultilineOperationIndentation + .limit( 10_000 ) # rubocop:disable Style/MultilineOperationIndentation list = [] notifications.each do |item| diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb index 13e0077b6..713322736 100644 --- a/lib/core_ext/string.rb +++ b/lib/core_ext/string.rb @@ -46,7 +46,7 @@ class String end c } - .join('') + .join('') # rubocop:disable Style/MultilineOperationIndentation end =begin diff --git a/lib/import/otrs2.rb b/lib/import/otrs2.rb index 628be2c18..7301f0db2 100644 --- a/lib/import/otrs2.rb +++ b/lib/import/otrs2.rb @@ -1262,7 +1262,7 @@ module Import::OTRS2 if !user begin display_name = Mail::Address.new( article['from'] ).display_name || - ( Mail::Address.new( article['from'] ).comments && Mail::Address.new( article['from'] ).comments[0] ) + ( Mail::Address.new( article['from'] ).comments && Mail::Address.new( article['from'] ).comments[0] ) rescue display_name = article['from'] end