]> git.openstreetmap.org Git - rails.git/commitdiff
Ignore the class length of test files
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 10 Jul 2019 15:24:32 +0000 (17:24 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 10 Jul 2019 15:24:32 +0000 (17:24 +0200)
There's no sensible way to refactor a controller test into multiple classes,
so lets exclude them from the class length metrics to reveal other over-length
classes.

.rubocop.yml
.rubocop_todo.yml

index 7d2df0445445ab5f25f560eeb0cdea58a474f0c2..87abac9a3becdd243a02b10ef612b2781d0a8004 100644 (file)
@@ -23,6 +23,10 @@ Metrics/BlockLength:
   Exclude:
     - 'config/routes.rb'
 
+Metrics/ClassLength:
+  Exclude:
+    - 'test/**/*'
+
 Naming/FileName:
   Exclude:
     - 'script/deliver-message'
index 4d772ed6eace4b65c868bfb15956292dacf95d3c..809cde374d470abfb57c755a369189dc1b73d34a 100644 (file)
@@ -50,7 +50,7 @@ Metrics/BlockNesting:
 # Offense count: 68
 # Configuration parameters: CountComments.
 Metrics/ClassLength:
-  Max: 1397
+  Max: 645
 
 # Offense count: 73
 Metrics/CyclomaticComplexity: