noop_primitive_operations

Group: style

Maturity: stable

Linter vnull

Since info is static, may be stale

View all Lint Rules

Using the Linter

Some operations on primitive types are idempotent and can be removed.

BAD:

doubleValue.toDouble();

intValue.toInt();
intValue.round();
intValue.ceil();
intValue.floor();
intValue.truncate();

string.toString();
string = 'hello\n'
    'world\n'
    ''; // useless empty string