Showing 1 of 1 total issue
Freeze mutable objects assigned to constants. Open
Open
VERSION = '1.1.0'
- Read upRead up
- Exclude checks
This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).
Example:
# bad
CONST = [1, 2, 3]
# good
CONST = [1, 2, 3].freeze