-
Notifications
You must be signed in to change notification settings - Fork 184
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
Potentially dangerous functions #149
Comments
Yeah I had on open issue with most of those #48, but I clearly haven't worked on them. If you think they would be useful PR welcome! |
I can see why attach/detach, setwd and library / require are bad - but why sapply? Am I missing |
OK, here is the thing. I realized that just looking for (say) So the parse data is not enough to implement these reliably. Maybe we can say, that not too many people use these function names, so we won't have many false positives, but how about My point is that this is a generic problem, but I am not sure if you want to solve it in lintr. |
@rkrug
returns a character vector, and
returns a list. This often leads to errors in edge cases. A better alternative is |
@gaborcsardi Thanks - makes sense. And it explains some errors I got in my analysis. Never looked at |
|
These come to mind, with various levels of danger:
attach/detach is definitely bad, but I am not quite sure about the others. library/require is only bad in a package, and R CMD check already warns for it. setwd is also only bad in a package imo, and if not used together with on.exit.
Would you like some of these in lintr?
The text was updated successfully, but these errors were encountered: