Skip to content

Commit

Permalink
Add Style/NumericLiterals's default parameter
Browse files Browse the repository at this point in the history
`Strict` parameter was added in rubocop#4045, but `default.yml` has not changed.

I saw the following warnings if set `Strict` to my `.rubocop.yml`.

```
Warning: unrecognized parameter Style/NumericLiterals:Strict found in /Users/onaka/src/github.com/onk/onkcop/.rubocop.yml
```
  • Loading branch information
onk committed Mar 27, 2017
1 parent 37c1fcf commit 0e38382
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ Style/NonNilCheck:

Style/NumericLiterals:
MinDigits: 5
Strict: false

Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_with_o
Expand Down
1 change: 1 addition & 0 deletions manual/cops_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -4039,6 +4039,7 @@ of digits in them.
Attribute | Value
--- | ---
MinDigits | 5
Strict | false

### References

Expand Down
1 change: 1 addition & 0 deletions spec/rubocop/cli/cli_auto_gen_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
'',
'# Offense count: 1',
'# Cop supports --auto-correct.',
'# Configuration parameters: Strict.',
'Style/NumericLiterals:',
' MinDigits: 7',
'',
Expand Down

0 comments on commit 0e38382

Please sign in to comment.