Skip to content

Fix false undocumented-parameter warning for @rdname groups#15

Merged
TroyHernandez merged 3 commits into
mainfrom
fix/undocumented-param-gating
Jun 7, 2026
Merged

Fix false undocumented-parameter warning for @rdname groups#15
TroyHernandez merged 3 commits into
mainfrom
fix/undocumented-param-gating

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

Closes #12.

When functions share an @rdname, their docs merge into a single Rd page and a parameter is documented if any block in the group documents it (this is exactly what generate_rd_grouped() does when building \arguments{}). The undocumented-parameter check, however, inspected each block's own params in isolation, so a function whose params were documented on a sibling block (e.g. set_format in tl) got falsely flagged even though R CMD check was clean.

Changes

  • Check each function's formals against the group-wide union of documented params (with @inheritParams resolved), mirroring the merge in generate_rd_grouped(). No more false positives for @rdname groups.
  • Gate the warning on cran_check instead of silent. It's a CRAN-completeness check, so cran_check = FALSE now suppresses it as expected. silent stays scoped to progress messages (where State that DESCRIPTION is unaltered #13 left it). Previously silent = TRUE hid the warning without fixing the underlying false positive.

Tests

Two regression tests in test_rdname.R:

  • Test 7: a param documented on a sibling block produces no warning.
  • Test 8: a genuinely undocumented param still warns, and cran_check = FALSE silences it.

Full suite: 162 pass, 0 fail.

Parameters can be documented on any block in an @Rdname group, since
they merge into a single Rd page. The check inspected each block's own
params in isolation, so a function documented via a sibling block was
falsely flagged (issue #12). Check formals against the group-wide union
of documented params, with @inheritParams resolved, mirroring the merge
in generate_rd_grouped().

Also gate the warning on cran_check rather than silent: it is a CRAN
completeness check, so cran_check = FALSE now suppresses it as expected,
and silent stays scoped to progress messages.
@TroyHernandez TroyHernandez merged commit dce3753 into main Jun 7, 2026
4 checks passed
@TroyHernandez TroyHernandez deleted the fix/undocumented-param-gating branch June 7, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The default-on CRAN checker does not understand @rdname

1 participant