Irregular usage of 'iota'
Reports irregular usage of iota within a constant declaration.
The iota identifier is reset for every constant declaration and automatically incremented for every constant specification. Within one constant specification, the identifier keeps its value. Explicitly referring to iota does not reset the counter.
For more information, refer to Iota in the Go specification.
This inspection is triggered if two constant specifications have a textually identical expression list containing at least one reference to iota and there are exclusively constant specifications without an expression list in between them.
Consider omitting the redundant expression list or writing out the expression list every time.
Example:
Triggers the inspection as the iota in the definition of c is redundant.
Example:
Does not trigger the inspection as none of the expression lists is redundant.
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.
GoIrregularIota- 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: GoIrregularIota
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: | |
Can be installed with plugin: | Go, 252.26654.0 |