Open gilescope opened 3 years ago
Lint name: inconsistent-digit-grouping
I tried this code:
1_0000_0000
The lint suggests the following grouping but it doesn't show the same intent:
100_000_000
Many times we're dealing with computers that like base 2. We should allow consistent base 2 groupings as not being something we should complain about.
This is inconsistent and I would be ok with it linting:
1_000_0_0000
But if there's a consistent pattern I think it's really not a helpful lint. I think we need to get a bit more nuanced with how this lint is designed.
Hey, thank you for the report. Could you try to reproduce this false positive again? I've tried the example in Rust's playground, but Clippy didn't trigger on 1_0000_0000. See playground :upside_down_face:
Lint name: inconsistent-digit-grouping
I tried this code:
The lint suggests the following grouping but it doesn't show the same intent:
Many times we're dealing with computers that like base 2. We should allow consistent base 2 groupings as not being something we should complain about.
This is inconsistent and I would be ok with it linting:
But if there's a consistent pattern I think it's really not a helpful lint. I think we need to get a bit more nuanced with how this lint is designed.