From: Andy Allan Date: Wed, 10 Jul 2019 15:24:32 +0000 (+0200) Subject: Ignore the class length of test files X-Git-Tag: live~2535 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/8c1a5d62f8b2f5491f7d476cdcbd0d4121903079 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. --- 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: