Commit 086f0dc69702573786165448ba9a13b87582915d

Authored by Laust Rud Jacobsen
1 parent 29dc6ba7
Exists in master and in 1 other branch production

Rubocop: for multi-line operations, indent subsequent lines a level

Should make it less confusing what belongs where
.rubocop.yml
... ... @@ -33,6 +33,9 @@ Style/DotPosition:
33 33 # Support code copy/paste into console
34 34 EnforcedStyle: trailing
35 35  
  36 +Style/MultilineOperationIndentation:
  37 + EnforcedStyle: indented
  38 +
36 39 Style/IndentHash:
37 40 EnforcedStyle: consistent
38 41  
... ...
.rubocop_todo.yml
... ... @@ -104,12 +104,6 @@ Style/IfUnlessModifier:
104 104 - 'app/models/notice.rb'
105 105 - 'app/models/user.rb'
106 106  
107   -# Offense count: 10
108   -# Cop supports --auto-correct.
109   -# Configuration parameters: EnforcedStyle, SupportedStyles.
110   -Style/MultilineOperationIndentation:
111   - Enabled: false
112   -
113 107 # Offense count: 873
114 108 # Cop supports --auto-correct.
115 109 # Configuration parameters: EnforcedStyle, SupportedStyles.
... ...
app/decorators/backtrace_line_decorator.rb
... ... @@ -57,7 +57,7 @@ private
57 57 link_to_hosted_javascript(app, text)
58 58 else
59 59 link_to_repo_source_file(app, text) ||
60   - link_to_issue_tracker_file(app, text)
  60 + link_to_issue_tracker_file(app, text)
61 61 end
62 62 end
63 63  
... ...
app/helpers/application_helper.rb
... ... @@ -57,7 +57,7 @@ module ApplicationHelper
57 57 total = (options[:total] || total_from_tallies(tallies))
58 58 percent = 100.0 / total.to_f
59 59 rows = tallies.map { |value, count| [(count.to_f * percent), value] }. \
60   - sort { |a, b| b[0] <=> a[0] }
  60 + sort { |a, b| b[0] <=> a[0] }
61 61 render "problems/tally_table", rows: rows
62 62 end
63 63  
... ...
app/models/app.rb
... ... @@ -177,8 +177,8 @@ class App
177 177 # Compare by number of unresolved errs, then problem counts.
178 178 def <=>(other)
179 179 (other.unresolved_count <=> unresolved_count).nonzero? ||
180   - (other.problem_count <=> problem_count).nonzero? ||
181   - name <=> other.name
  180 + (other.problem_count <=> problem_count).nonzero? ||
  181 + name <=> other.name
182 182 end
183 183  
184 184 def email_at_notices
... ...