From d919b4b1bc4bee50f7eee5331e770729b1a1acd7 Mon Sep 17 00:00:00 2001 From: frederic Date: Wed, 15 Jan 2025 16:11:15 -0800 Subject: [PATCH] non-production updating rubocop hash and array configurations --- ruby/.rubocop.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/ruby/.rubocop.yml b/ruby/.rubocop.yml index 6f9a570..8c7e74e 100644 --- a/ruby/.rubocop.yml +++ b/ruby/.rubocop.yml @@ -13,6 +13,36 @@ AllCops: - !ruby/regexp /old_and_unused\.rb$/ NewCops: enable +# Configure cops for styles that we enforce and autocorrect for (where applicable) +# Please add new configurations in alphabetical order and make sure their keys are not re-used in the section below + +Layout/ExtraSpacing: + Enabled: true + AllowForAlignment: true + AllowBeforeTrailingComments: true + ForceEqualSignAlignment: true + +Layout/FirstArrayElementIndentation: + EnforcedStyle: consistent + +Layout/FirstHashElementIndentation: + EnforcedStyle: consistent + +Layout/FirstHashElementLineBreak: + Enabled: true + +Layout/HashAlignment: + Enabled: true + EnforcedHashRocketStyle: table + EnforcedColonStyle: table + EnforcedLastArgumentHashStyle: always_inspect + +Layout/MultilineHashBraceLayout: + EnforcedStyle: symmetrical + +Layout/MultilineHashKeyLineBreaks: + Enabled: true + # Configure cops for styles that we do not adhere to or are not agreed upon # Default settings and options can be viewed here: https://raw.githubusercontent.com/bbatsov/rubocop/master/config/default.yml # Please add new configurations in alphabetical order @@ -26,12 +56,6 @@ Layout/EmptyLinesAroundClassBody: Layout/EndOfLine: Enabled: false -Layout/ExtraSpacing: - Enabled: false - -Layout/HashAlignment: - Enabled: false - Layout/LineLength: Max: 150 Exclude: