Linting rules
S008: negated-is-type-can-use-not-is
Detects negated type checks written as `!(a is T)`.
Metadata
Code:S008Rule:negated-is-type-can-use-not-isStatus: Stable sincev0.0.1Quick fix: always available
What it does
Detects negated type checks written as !(a is T).
Why is this bad?
Tolk has a dedicated !is operator, which is clearer than negating is.
Example
if (!(value is int)) { return;
}Use instead:
if (value !is int) {
return;
}Last updated on