Linting rules
E010: used-ignored-identifier
Checks for usages of identifiers explicitly marked as unused with a leading underscore.
Metadata
Code:E010Rule:used-ignored-identifierStatus: Stable sincev0.0.1Quick fix: always available
What it does
Checks for usages of identifiers explicitly marked as unused with a leading underscore.
Why is this bad?
Prefixing with _ means the identifier is intentionally unused.
Using it later is misleading and makes code harder to read.
Example
fun main() {
val _value = 10;
_value;}Use instead:
fun main() {
val value = 10;
value;
}Last updated on