Martin Becker
2023-Nov-07 16:13 UTC
[Rd] False positives in check for lost braces (in tools::checkRd())
Dear developers, while preparing to submit a package to CRAN, I noticed that a check for lost braces in Rd files (which is enabled in the current r-devel when checking with the '--as-cran' option) seems to return false positives. More specifically, a 'Lost braces' NOTE is issued (at least sometimes) when using the \insertRef{...}{...} command from the Rdpack package. Since the corresponding changes in r-devel seem to be quite recent (apparently as of r85196), I hope this sketchy report is sufficient to track down the problem. If not, I will try to create a reproducible example. Best regards and many thanks, Martin -- apl. Prof. Dr. Martin Becker, Akad. Oberrat Lehrstab Statistik Quantitative Methoden Fakult?t f?r Empirische Humanwissenschaften und Wirtschaftswissenschaft Universit?t des Saarlandes Campus C3 1, Raum 2.17 66123 Saarbr?cken Deutschland
Ivan Krylov
2023-Nov-07 22:00 UTC
[Rd] False positives in check for lost braces (in tools::checkRd())
On Tue, 7 Nov 2023 17:13:05 +0100 Martin Becker <martin.becker at mx.uni-saarland.de> wrote:> More specifically, a 'Lost braces' NOTE is issued (at least > sometimes) when using the \insertRef{...}{...} command from the > Rdpack package.Does anything change if you use the development version of Rdpack (not currently on CRAN)? Apparently, the latest commit performs some changes to fix the "lost braces" note: https://github.com/GeoBosh/Rdpack/commit/569ee0515fce00eac98ef45e642b805cb473ce1c -- Best regards, Ivan
Sebastian Meyer
2023-Nov-07 22:59 UTC
[Rd] False positives in check for lost braces (in tools::checkRd())
This is a known issue already reported to the Rdpack maintainer. In some cases, the Rd code generated by Rdpack's macros contains unnecessary braces that trigger the check note because they match the pattern "text{text}" that detects common mistakes like "code{x}" (missing an escape for the macro name). Rdpack's fork of tools::deparseLatex() is being updated to drop the braces that cause the note. I have modified the check code to ignore these cases for now (r85491). Best regards, Sebastian Meyer Am 07.11.23 um 17:13 schrieb Martin Becker:> Dear developers, > > while preparing to submit a package to CRAN, I noticed that a check for > lost braces in Rd files (which is enabled in the current r-devel when > checking with the '--as-cran' option) seems to return false positives. > > More specifically, a 'Lost braces' NOTE is issued (at least sometimes) > when using the \insertRef{...}{...} command from the Rdpack package. > > Since the corresponding changes in r-devel seem to be quite recent > (apparently as of r85196), I hope this sketchy report is sufficient to > track down the problem. If not, I will try to create a reproducible example. > > Best regards and many thanks, > Martin > >
Reasonably Related Threads
- False positives in check for lost braces (in tools::checkRd())
- False positives in check for lost braces (in tools::checkRd())
- checkRd freezes while parsing erroneous preprocessor macros
- tools::checkRd() output different from R CMD check
- linear programming in R | limits to what it can do, or my mistake?