Closed jan-glx closed 8 months ago
A potentially cleaner alternative could be to set the default for on_error
to if(interactive()) "never" else "warning"
within the function's formals, while leaving the error checking (the match.arg
call) to rcmdcheck::rcmdcheck
.
Sorry I just did a fix for this myself, because I didn't realize this PR was here. Next time if you refer to the associated issue using the Magic Syntax, it will create a link and make these things much easier for others to discover.
Thanks for the PR anyway!
https://code-review.tidyverse.org/author/submitting.html#sec-github-features
Of course! - did not realize there was an open issue about this... your solution referencing rcmdcheck::rcmdcheck
documentation is better anyways!
Currently the documentation for
devtools::check
'son_error
parameter reads as inherited fromrcmdcheck::rcmdcheck
:However,
devtools
already sets the default to"never"
(for interactive session) or"warning"
(for non-nteractive sessions) according to: https://github.com/r-lib/devtools/blob/2c642ab44f4fb9d4117f0e198dfcf42ad79e432a/R/check.R#L56 https://github.com/r-lib/devtools/blob/2c642ab44f4fb9d4117f0e198dfcf42ad79e432a/R/check.R#L72 https://github.com/r-lib/devtools/blob/2c642ab44f4fb9d4117f0e198dfcf42ad79e432a/R/check.R#L82-L85This PR copies the description to of
on_error
todevtools::check
and fixes the description of this default behavior.