Open kevinushey opened 8 years ago
We currently have a couple simple diagnostics checkers:
if (x = 1) { ... } # using '=' instead of the probably intended '=='; although note that this is a parse error if (x == NULL) { ... } # use 'is.null()'
What other similar code smells are out there?
We should warn about unused comparison results, e.g.
x == 10 for (i in seq_len(x)) { ... }
The user likely intended to write x = 10.
x = 10
We currently have a couple simple diagnostics checkers:
What other similar code smells are out there?