819 - refactor use_files.R before adding replace arg #1022
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To fix #819 , there is the possibility to refactor the internals of
use_external_XXX
type functions inuse_files.R
prior to the addition of a new replace arg.This may or may not be useful; I think it could be, hence the draft PR with some benefits being to reduce duplication
It's easier to add the 'replace'-argument in only one place then (see last commit to this PR).
Essentially all
use_external_xxx
funcs inuse_files.R
do the same, so this PR tries to encapsulate identical behaviour into smaller maintainable pieces.Of course this proposal comes along with quite some work and probably there should be some tests added as well... happy do get on this though!