From 8c1a5d62f8b2f5491f7d476cdcbd0d4121903079 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 10 Jul 2019 17:24:32 +0200 Subject: [PATCH 1/1] Ignore the class length of test files 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 | 4 ++++ .rubocop_todo.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7d2df0445..87abac9a3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -23,6 +23,10 @@ Metrics/BlockLength: Exclude: - 'config/routes.rb' +Metrics/ClassLength: + Exclude: + - 'test/**/*' + Naming/FileName: Exclude: - 'script/deliver-message' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4d772ed6e..809cde374 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -50,7 +50,7 @@ Metrics/BlockNesting: # Offense count: 68 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 1397 + Max: 645 # Offense count: 73 Metrics/CyclomaticComplexity: -- 2.45.1