From 99f773a04036c6eddd1a34308394436a49ba7c76 Mon Sep 17 00:00:00 2001 From: Artem Chernikov Date: Wed, 30 Jul 2014 23:36:32 +0200 Subject: [PATCH] Style/Blocks Style/BlockNesting cops enabled --- .rubocop.yml | 8 ++++++++ .rubocop_todo.yml | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index decec640..82c8d3e4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -92,6 +92,14 @@ Style/AlignParameters: Style/AndOr: Enabled: true +# avoid deep blocks nesting +Style/BlockNesting: + Max: 4 + +# use do instead of {...} in multiline blocks +Style/Blocks: + Enabled: true + AllCops: Include: - '**/Rakefile' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0a24cae6..4b51e808 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,17 +5,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. - - -# Offense count: 1 -Style/BlockNesting: - Max: 4 - -# Offense count: 2 -# Cop supports --auto-correct. -Style/Blocks: - Enabled: false - # Offense count: 2 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles.