[R-pkg-devel] Possible bug in Codoc checking with R CMD Check

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Sat Aug 5 21:43:02 CEST 2023


В Sat, 5 Aug 2023 12:26:20 -0400
<bill using denney.ws> пишет:

> I think that the error is coming from
> the Codoc check in R CMD check not escaping the backslash before
> ldots.  Is my diagnosis correct?  If so, what is the best way to
> report this as a bug in R CMD check?

>   Mismatches in argument default values:
> 
>     Name: 'subsequent_page_notification' Code: "\\ldots continued"
> Docs: "\... continued"

I think you're right. You can see the code doing the string
substitution in tools:::.parse_usage_as_much_as_possible.
Unfortunately, expressing "replace \whatever but only if the backslash
is not escaped" using regular expressions is hard; for example,
\\\whatever ought to be interpreted as an escaped backslash followed by
a non-escaped \whatever, and so on. A negative look-behind assertion
wouldn't do the right thing in this case.

Send an e-mail to R-devel using r-project.org to discuss a potential
solution, but be ready to file a problem report on R Bugzilla in order
to make sure that it's not forgotten (which takes more steps but may be
"more right"). See https://r-project.org/bugs.html for the official
instructions.

Meanwhile, I can suggest omitting the "\\ldots continued" default value
from the Rd file as a workaround. WRE is not explicit about this, but
missing default argument values currently don't count against you
during a codoc() check, which is useful if the actual expression used
to compute the default value is unwieldy.

-- 
Best regards,
Ivan



More information about the R-package-devel mailing list