From c9e7a8f9e1efb7a92e7b1855f0fb04230b9a431e Mon Sep 17 00:00:00 2001 From: Adam Rice Date: Sat, 11 Nov 2023 14:55:22 +1100 Subject: [PATCH] Consider frozen_string_literal a safe autocorrect This allows formatters, e.g Ruby LSP, to autocorrect the file. Without this change, it's up to you to remember how to add those comments and, in reality, they're quite safe to add to a greenfield product like this --- .rubocop.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 311836c..e8b2121 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -127,11 +127,9 @@ Style/Documentation: Style/EndlessMethod: Enabled: false -Style/TrailingBodyOnMethodDefinition: - Enabled: false - -Style/TrailingMethodEndStatement: - Enabled: false +Style/FrozenStringLiteralComment: + Enabled: true + SafeAutoCorrect: true Style/GuardClause: Enabled: false @@ -163,8 +161,14 @@ Style/StringLiterals: Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes +Style/TrailingBodyOnMethodDefinition: + Enabled: false + Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: consistent_comma Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: consistent_comma + +Style/TrailingMethodEndStatement: + Enabled: false