Esc

unreadable_literal

Finds a long number without _ separators (1000000, 0xdeadbeef).

Category pedantic, allow by default.

Off by default; the example is shown with the rule enabled.

Example
#import "Basic";

TIMEOUT :: 1000000;

main :: () {
    print("%\n", TIMEOUT);
}
Diagnostic
warning[unreadable_literal]: `1000000` is hard to read without separators
  --> example.jai:3:12
   |
 3 | TIMEOUT :: 1000000;
   |            ^^^^^^^
   |
help: write `1_000_000`
   |
 3 ~ TIMEOUT :: 1_000_000;
   |
Fixed
#import "Basic";

TIMEOUT :: 1_000_000;

main :: () {
    print("%\n", TIMEOUT);
}

Off by default: the standard library alone has thousands of such constants.