Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider more diagnostics 'checkers' #14

Open
kevinushey opened this issue Mar 21, 2016 · 1 comment
Open

consider more diagnostics 'checkers' #14

kevinushey opened this issue Mar 21, 2016 · 1 comment

Comments

@kevinushey
Copy link
Owner

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?

@kevinushey
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant