Skip to content

Commit

Permalink
Consider frozen_string_literal a safe autocorrect
Browse files Browse the repository at this point in the history
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
  • Loading branch information
HashNotAdam committed Nov 11, 2023
1 parent ad8a6ab commit c9e7a8f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit c9e7a8f

Please sign in to comment.