Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumericLiterals auto-gen-config Off By One #884

Closed
tmorris-fiksu opened this issue Mar 14, 2014 · 2 comments · Fixed by #887
Closed

NumericLiterals auto-gen-config Off By One #884

tmorris-fiksu opened this issue Mar 14, 2014 · 2 comments · Fixed by #887
Assignees

Comments

@tmorris-fiksu
Copy link
Contributor

rubocop --auto-gen-config does not correctly repair the NumericLiterals cop.
For a 6 digit number, the following is generated:

NumericLiterals:
  MinDigits: 6

Either the cop should ignore 6 digit numbers or the cop's auto-gen should be 7.

Sample file and version:

$ cat sample.rb
y = 123456
puts y
$ rubocop -V
0.19.0 (using Parser 2.1.7, running on ruby 1.9.3 x86_64-darwin12.5.0)
@jonas054
Copy link
Collaborator

You're right. I'll fix it.

@tmorris-fiksu
Copy link
Contributor Author

I just put in a PR for this. Hopefully, I beat you to it. A simple one to get my feet wet: #887

bbatsov added a commit that referenced this issue Mar 15, 2014
…config_off_by_one_884

[#884] Fix --auto-gen-config for `NumericLiterals` so MinDigits is correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants