-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #3981] Allow NumericLiterals to be less strict
This introduces a new configuration option for `Style/NumericLiteral` called `Strict`, which requires numbers to have a group of 3 digits at end. The cop was changed in 0.47.0 for this behavior, but it's a common practise to specify monetary amounts in cents and then it's useful to group the cents separately (e.g. $123,456.78 as `Money.new(123_456_78)` instead of `Money.new(12_345_678)`). So this commit makes the behavior configurable and reverts the default to the behavior before the 0.47.0 release.
- Loading branch information
Showing
4 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters