Fix @returns alias (#24) and unquoted-name false positive (#23)#25
Conversation
Curated software names (OpenAI, TensorFlow) are unambiguous: directive warning plus auto-quoting by fix=TRUE and fix_description_cran(). Dependency names from Imports/Depends are ambiguous in prose (e.g. base R graphics system), so they get an advisory warning only and are never rewritten. Fixes a false positive that warned about and auto-quoted the ordinary word graphics.
|
Thanks @grantmcdermott, both fixed here (v0.3.3.6).
The Appreciate you putting tinyrox through its paces on tinyplot. |
|
Quick follow-up, @grantmcdermott: digging into your two reports made me question two of tinyrox's own defaults, and I'm planning to fold the answers into this PR rather than spin up separate ones.
Both would land as amendments to this PR, not blockers. Since you started me down this path, curious whether you'd call the strict-allowlist hard error a feature or a footgun. |
|
Thanks Troy. Both sound like good ideas to me. Quick responses/thoughts:
|
An unknown or misspelled tag previously aborted document() for the whole package (this is how a single @returns blocked tinyplot). It now warns, names the tag, drops its content, and keeps parsing every other tag. The allowlist still governs what produces Rd output.
A documentation generator should not lint DESCRIPTION prose. Drops the unquoted-name check (check_description_cran/fix_description_cran) and the web-service-link check, along with their hardcoded KNOWN_SOFTWARE_NAMES / WEBSERVICE_PACKAGES lists, which had no roxygen2 or R CMD check equivalent and produced the graphics false positive. The token-based code checker (#21) and the example checks stay; check_cran() now runs just those two.
Two issues reported by @grantmcdermott while running tinyrox on tinyplot.
#24 —
@returnsrejected as unknown tagroxygen2 supports
@returnsas an alias of@return; tinyrox only allowlisted@return, so a single@returnsaborteddocument(). Added@returnsto the tag allowlist and routed it to the same Rd slot.#23 — dependency package name flagged in Description prose
check_description_cran()cross-referenced the package's own dependency names against the Title/Description prose, so "base R graphics system" got flagged becausegraphicsis an import (andfix = TRUErewrote it to'graphics'). CRAN only wants quoting when you refer to a package/software by name, not for ordinary words.The check is now tiered by confidence:
OpenAI,TensorFlow, ...) — unambiguous proper nouns, so a directive warning and auto-quoting byfix = TRUE/fix_description_cran().So
graphicsis flagged with a soft "ordinary-word uses are fine" note and left untouched, whileOpenAIstill gets the hard nudge.Version bumped to 0.3.3.6, tinytests added for both,
R CMD check --as-cranclean (0/0/0).Closes #23
Closes #24