Acton
Linting rules

E010: used-ignored-identifier

Checks for usages of identifiers explicitly marked as unused with a leading underscore.

Metadata

  • Code: E010
  • Rule: used-ignored-identifier
  • Status: Stable since v0.0.1
  • Quick 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;
E010: identifier marked as unused is used
}

Use instead:

fun main() {
    val value = 10;
    value;
}
Source code

Last updated on

On this page