Skip to content

Commit

Permalink
Mark Style/MutableConstant as unsafe
Browse files Browse the repository at this point in the history
Follow #8529.

`Style/MutableConstant` is the same as `Style/FrozenStringLiteralComment`,
freezing object is unsafe auto-correction.
  • Loading branch information
koic authored and bbatsov committed Jan 4, 2021
1 parent 41928e8 commit b5da2b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/change_mark_style_mutable_constant_as_unsafe.md
@@ -0,0 +1 @@
* [#9331](https://github.com/rubocop-hq/rubocop/pull/9331): Mark `Style/MutableConstant` as unsafe. ([@koic][])
3 changes: 2 additions & 1 deletion config/default.yml
Expand Up @@ -3746,7 +3746,8 @@ Style/MutableConstant:
Description: 'Do not assign mutable objects to constants.'
Enabled: true
VersionAdded: '0.34'
VersionChanged: '0.65'
VersionChanged: <<next>>
SafeAutoCorrect: false
EnforcedStyle: literals
SupportedStyles:
# literals: freeze literals assigned to constants
Expand Down

0 comments on commit b5da2b4

Please sign in to comment.