From f5c2a3d4ef7bf34ae8db4e2b2bd83c22a5d2c555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 1 Jul 2023 18:49:34 +0200 Subject: [PATCH] Add and apply BlockAlignment rubocop rule This will make it easier to run rubocop with `--autocorrect` when dealing with the LineLength rule. --- .rubocop.yml | 3 +++ db/dev_seeds.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 7d16caa06..3ff4c8d67 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -27,6 +27,9 @@ Layout/ArrayAlignment: Layout/AssignmentIndentation: Enabled: true +Layout/BlockAlignment: + Enabled: true + Layout/ClosingHeredocIndentation: Enabled: true diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 05250b78c..00f102f22 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -5,8 +5,8 @@ end @logger = Logger.new(STDOUT) @logger.formatter = proc do |_severity, _datetime, _progname, msg| - msg unless Rails.env.test? - end + msg unless Rails.env.test? +end def load_dev_seeds(dev_seeds_file) load Rails.root.join("db", "dev_seeds", "#{dev_seeds_file}.rb")