From a88d62bcc638a62dee9bbed70c0a881026e3d17c Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 5 Jun 2019 16:29:54 +0200 Subject: [PATCH] Ignore the block length of the routes Since the routes are more of a dsl than code, we've been happy to repeatedly bump up this number. But then that hides other code which has over-long block lengths hiding behind. So instead let's exclude the routes from this metric. --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5bf565c31..7d2df0445 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,6 +19,10 @@ Lint/PercentStringArray: - 'app/controllers/application_controller.rb' - 'app/controllers/site_controller.rb' +Metrics/BlockLength: + Exclude: + - 'config/routes.rb' + Naming/FileName: Exclude: - 'script/deliver-message' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 76a4cada2..26b5aa64b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -40,7 +40,7 @@ Metrics/AbcSize: # Configuration parameters: CountComments, ExcludedMethods. # ExcludedMethods: refine Metrics/BlockLength: - Max: 263 + Max: 71 # Offense count: 15 # Configuration parameters: CountBlocks. -- 2.43.2