Commit 086f0dc69702573786165448ba9a13b87582915d
1 parent
29dc6ba7
Exists in
master
and in
1 other branch
Rubocop: for multi-line operations, indent subsequent lines a level
Should make it less confusing what belongs where
Showing
5 changed files
with
7 additions
and
10 deletions
Show diff stats
.rubocop.yml
| @@ -33,6 +33,9 @@ Style/DotPosition: | @@ -33,6 +33,9 @@ Style/DotPosition: | ||
| 33 | # Support code copy/paste into console | 33 | # Support code copy/paste into console |
| 34 | EnforcedStyle: trailing | 34 | EnforcedStyle: trailing |
| 35 | 35 | ||
| 36 | +Style/MultilineOperationIndentation: | ||
| 37 | + EnforcedStyle: indented | ||
| 38 | + | ||
| 36 | Style/IndentHash: | 39 | Style/IndentHash: |
| 37 | EnforcedStyle: consistent | 40 | EnforcedStyle: consistent |
| 38 | 41 |
.rubocop_todo.yml
| @@ -104,12 +104,6 @@ Style/IfUnlessModifier: | @@ -104,12 +104,6 @@ Style/IfUnlessModifier: | ||
| 104 | - 'app/models/notice.rb' | 104 | - 'app/models/notice.rb' |
| 105 | - 'app/models/user.rb' | 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 | # Offense count: 873 | 107 | # Offense count: 873 |
| 114 | # Cop supports --auto-correct. | 108 | # Cop supports --auto-correct. |
| 115 | # Configuration parameters: EnforcedStyle, SupportedStyles. | 109 | # Configuration parameters: EnforcedStyle, SupportedStyles. |
app/decorators/backtrace_line_decorator.rb
| @@ -57,7 +57,7 @@ private | @@ -57,7 +57,7 @@ private | ||
| 57 | link_to_hosted_javascript(app, text) | 57 | link_to_hosted_javascript(app, text) |
| 58 | else | 58 | else |
| 59 | link_to_repo_source_file(app, text) || | 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 | end | 61 | end |
| 62 | end | 62 | end |
| 63 | 63 |
app/helpers/application_helper.rb
| @@ -57,7 +57,7 @@ module ApplicationHelper | @@ -57,7 +57,7 @@ module ApplicationHelper | ||
| 57 | total = (options[:total] || total_from_tallies(tallies)) | 57 | total = (options[:total] || total_from_tallies(tallies)) |
| 58 | percent = 100.0 / total.to_f | 58 | percent = 100.0 / total.to_f |
| 59 | rows = tallies.map { |value, count| [(count.to_f * percent), value] }. \ | 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 | render "problems/tally_table", rows: rows | 61 | render "problems/tally_table", rows: rows |
| 62 | end | 62 | end |
| 63 | 63 |
app/models/app.rb
| @@ -177,8 +177,8 @@ class App | @@ -177,8 +177,8 @@ class App | ||
| 177 | # Compare by number of unresolved errs, then problem counts. | 177 | # Compare by number of unresolved errs, then problem counts. |
| 178 | def <=>(other) | 178 | def <=>(other) |
| 179 | (other.unresolved_count <=> unresolved_count).nonzero? || | 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 | end | 182 | end |
| 183 | 183 | ||
| 184 | def email_at_notices | 184 | def email_at_notices |