Commit f2c119500a6d5236b7a4b597a6d2239a06271016

Authored by Laust Rud Jacobsen
1 parent 126757c5
Exists in master and in 1 other branch production

Rubocop: disable .find_by rule, mongoid is different

Showing 2 changed files with 8 additions and 12 deletions   Show diff stats
@@ -3,3 +3,8 @@ inherit_from: .rubocop_todo.yml @@ -3,3 +3,8 @@ inherit_from: .rubocop_todo.yml
3 3
4 AllCops: 4 AllCops:
5 RunRailsCops: true 5 RunRailsCops: true
  6 +
  7 +# Caveat: .find_by raises exception in mongoid, unlike ActiveRecord which
  8 +# returns nil
  9 +Rails/FindBy:
  10 + Enabled: false
.rubocop_todo.yml
1 # This configuration was generated by 1 # This configuration was generated by
2 # `rubocop --auto-gen-config` 2 # `rubocop --auto-gen-config`
3 -# on 2015-10-12 21:40:12 +0200 using RuboCop version 0.34.2. 3 +# on 2015-10-12 21:40:48 +0200 using RuboCop version 0.34.2.
4 # The point is for the user to remove these configuration records 4 # The point is for the user to remove these configuration records
5 # one by one as the offenses are removed from the code base. 5 # one by one as the offenses are removed from the code base.
6 # Note that changes in the inspected code, or installation of new 6 # Note that changes in the inspected code, or installation of new
@@ -19,7 +19,7 @@ Metrics/ClassLength: @@ -19,7 +19,7 @@ Metrics/ClassLength:
19 Metrics/CyclomaticComplexity: 19 Metrics/CyclomaticComplexity:
20 Max: 11 20 Max: 11
21 21
22 -# Offense count: 457 22 +# Offense count: 458
23 # Configuration parameters: AllowURI, URISchemes. 23 # Configuration parameters: AllowURI, URISchemes.
24 Metrics/LineLength: 24 Metrics/LineLength:
25 Max: 239 25 Max: 239
@@ -33,15 +33,6 @@ Metrics/MethodLength: @@ -33,15 +33,6 @@ Metrics/MethodLength:
33 Metrics/PerceivedComplexity: 33 Metrics/PerceivedComplexity:
34 Max: 12 34 Max: 12
35 35
36 -# Offense count: 4  
37 -# Cop supports --auto-correct.  
38 -# Configuration parameters: Include.  
39 -Rails/FindBy:  
40 - Exclude:  
41 - - 'app/models/app.rb'  
42 - - 'app/models/error_report.rb'  
43 - - 'app/models/user.rb'  
44 -  
45 # Offense count: 16 36 # Offense count: 16
46 # Configuration parameters: Include. 37 # Configuration parameters: Include.
47 Rails/Output: 38 Rails/Output:
@@ -163,7 +154,7 @@ Style/DeprecatedHashMethods: @@ -163,7 +154,7 @@ Style/DeprecatedHashMethods:
163 Style/Documentation: 154 Style/Documentation:
164 Enabled: false 155 Enabled: false
165 156
166 -# Offense count: 7 157 +# Offense count: 9
167 # Cop supports --auto-correct. 158 # Cop supports --auto-correct.
168 # Configuration parameters: EnforcedStyle, SupportedStyles. 159 # Configuration parameters: EnforcedStyle, SupportedStyles.
169 Style/DotPosition: 160 Style/DotPosition: