RAIYYAN ABDULLA NADDIMULLA SHAIK
2025-Oct-08 19:37 UTC
[Rd] Suggestion: Structured output for tools::checkRd()
Hello R-devel,
While working with the output of tools::checkRd(), I noticed that the
function currently returns a classed character string in the format checkRd:
(%d) %s. In order to consume this output programmatically (e.g., for editor
integrations, reporting, or CI automation), one is forced to parse the
returned string to extract useful details like line numbers and
error/warning messages.
It seems like returning a more structured object, such as a list or data
frame with elements like line_number and finding, would make downstream use
much easier and more robust. For example, this would allow developers to
directly access relevant information without string parsing.
I see that the current method for displaying results, print.checkRd(),
essentially performs this string parsing for formatting:
https://github.com/r-devel/r-svn/blob/a2fb5899d5d7a8d21dfbfb4f710f70672784e672/src/library/tools/R/RdConv2.R#L1160-L1169
Would you consider updating tools::checkRd() to optionally return a more
structured result in a future R release?
Thanks for considering this suggestion!
I?d be happy to help test or discuss any proposed changes.
Best regards,
NSA RAIYYAN
--
The information contained in this electronic communicati...{{dropped:17}}