-
Notifications
You must be signed in to change notification settings - Fork 27
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
FR: flow_view_source_calls: watch for R.utils::sourceDirectory #156
Comments
Hi @pvictor , thanks for the FR. Can you show me an example of what you have in mind when you say "declare a list of sourcing calls to watch for in an argument of the function" ?
|
I was thinking of something like this (sorry, it was much clearer in my head in french) : flow::flow_view_source_calls(
paths = ".",
more_calls = c("sourceDirectory", "R.utils::sourceDirectory")
) Where the rule is that only the first argument is checked. |
I think I'd rather use the recursive and pattern args if possible and and I think false positives are unlikely if I just support it out of the box. I've drafted it, can you update and try it ? It's not documented nor formally tested yet, and I should probably include |
see also caveat in #157 |
Thanks! I have an error with GitHub version :
Here an example repo with the code I ran : https://github.com/pvictor/flow-source-calls |
Great reprex, thanks a lot for the effort! Interesting case also, you have in
Seemingly referring to the funs and modules subfolder, but the working directory is not decided by the file being run, so "funs" will refer to the folder under the root, and "modules" doesn't exist, so has zero eligible files and this corner case is not gracefully handled. |
In fact |
I've pushed changes so that the reported bug is fixed (considering changes of working directory), the behavior above worries me though, @HenrikBengtsson do you know what might happen above ? |
Hello,
A little feature request : it could be interesting to included directories of scripts sourced with
sourceDirectory
, or even better declare a list of sourcing calls to watch for in an argument of the function.Victor
The text was updated successfully, but these errors were encountered: