Hacker News new | past | comments | ask | show | jobs | submit login

Install the Rubocop extension in your editor and it'll bug you about it every time you have a big int (kind of annoying when you're doing one-off scripts and embed "magic numbers" like IDs from the database lol)



Listing cops with:

  rubocop --show-cops
I can see that the NumericLiterals cop that's bothering you supports autocorrect so running:

  rubocop -A <filename>
should fix the problem for you.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: