Prefer intValue.isOdd/isEven instead of checking the result of % 2DRT-W1201
PREFER the use of intValue.isOdd/isEven to check for evenness.
BAD:
bool isEven = 1 % 2 == 0;
bool isOdd = 13 % 2 == 1;
GOOD:
bool isEven = 1.isEven;
bool isOdd = 13.isOdd;
PREFER the use of intValue.isOdd/isEven to check for evenness.
BAD:
bool isEven = 1 % 2 == 0;
bool isOdd = 13 % 2 == 1;
GOOD:
bool isEven = 1.isEven;
bool isOdd = 13.isOdd;