Suspicious underscore in number literal
Reports decimal number literals that use the underscore numeric separator with groups where the number of digits is not three. Such literals may contain a typo.
This inspection will not warn on literals containing two consecutive underscores. It is also allowed to omit underscores in the fractional part of double and float literals.
Example: int oneMillion = 1_000_0000;
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SuspiciousLiteralUnderscore- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Inspection ID: SuspiciousLiteralUnderscore
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |