From 658bd6f097caca82fa9479cca8db893e66735fd5 Mon Sep 17 00:00:00 2001
From: Darius Schneider <schneider@itc.rwth-aachen.de>
Date: Mon, 24 Feb 2025 12:45:59 +0100
Subject: [PATCH] consistent indentation for assignments, prevent unnecessarily
 deep indentation

---
 rails/rubocop/rubocop-base.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/rails/rubocop/rubocop-base.yml b/rails/rubocop/rubocop-base.yml
index 9eb16be..35d1a46 100644
--- a/rails/rubocop/rubocop-base.yml
+++ b/rails/rubocop/rubocop-base.yml
@@ -9,10 +9,18 @@ AllCops:
 
 # BEGIN Customizations
 # BEGIN Layout
+# align case with its 'end' to forbid deep indentation and be consistent with variable assignments
+Layout/CaseIndentation:
+  EnforcedStyle: end # default: case
+
 # only before, enforcing also after adds too many blank lines
 Layout/EmptyLinesAroundAccessModifier:
   EnforcedStyle: only_before # default: around
 
+# prevent unnecessary deep indentation by enforcing 'end' to be at the start of the line
+Layout/EndAlignment:
+  EnforcedStyleAlignWith: start_of_line # default: keyword
+
 # indent first element one level deeper than the 'parent'
 Layout/FirstArrayElementIndentation:
   EnforcedStyle: consistent # default: special_inside_parentheses
-- 
GitLab