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

Use underscore separation for large integers #924

Closed
mtaube opened this issue Dec 2, 2016 · 2 comments
Closed

Use underscore separation for large integers #924

mtaube opened this issue Dec 2, 2016 · 2 comments
Labels
rule-request Requests for a new rules.

Comments

@mtaube
Copy link

mtaube commented Dec 2, 2016

Any number greater than 4 characters should use _ for separation.

// bad
let num = 10000000

// good
let num = 10_000_000
@jpsim
Copy link
Collaborator

jpsim commented Dec 3, 2016

Good idea!

@marcelofabri marcelofabri added the rule-request Requests for a new rules. label Dec 3, 2016
@marcelofabri
Copy link
Collaborator

marcelofabri commented Dec 4, 2016

Maybe it should validate that the _ are separating blocks of 3 digits as well?

Example from the docs:

let oneMillion = 1_000_000
let justOverOneMillion = 1_000_000.000_000_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule-request Requests for a new rules.
Projects
None yet
Development

No branches or pull requests

3 participants