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 7d2df04..87abac9 100644 (file)
@@ -23,6 +23,10 @@ Metrics/BlockLength:
   Exclude:
     - 'config/routes.rb'
 
+Metrics/ClassLength:
+  Exclude:
+    - 'test/**/*'
+
 Naming/FileName:
   Exclude:
     - 'script/deliver-message'
index 4d772ed..809cde3 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: