-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mrc 5429 - warn on "..." specified for null driver in hipercow_init #135
Conversation
R/root.R
Outdated
@@ -24,6 +24,16 @@ | |||
##' path <- withr::local_tempfile() | |||
##' hipercow_init(path) | |||
hipercow_init <- function(root = ".", driver = NULL, ...) { | |||
if ((is.null(driver)) && (length(list(...)) > 0)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps look into rlang::check_dots_used
(https://rlang.r-lib.org/reference/check_dots_used.html) which might do this for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is the possibility of...
if (is.null(driver)) {
rlang::check_dots_empty()
}
but converting this from an error to a warning, and including a message to say why
! ...
must be empty.
only applies when driver = NULL was a bit fiddly.
Co-authored-by: Rich FitzJohn <[email protected]>
No description provided.