Fix false undocumented-parameter warning for @rdname groups#15
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 whatgenerate_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_formatin tl) got falsely flagged even thoughR CMD checkwas clean.Changes
@inheritParamsresolved), mirroring the merge ingenerate_rd_grouped(). No more false positives for@rdnamegroups.cran_checkinstead ofsilent. It's a CRAN-completeness check, socran_check = FALSEnow suppresses it as expected.silentstays scoped to progress messages (where State that DESCRIPTION is unaltered #13 left it). Previouslysilent = TRUEhid the warning without fixing the underlying false positive.Tests
Two regression tests in
test_rdname.R:cran_check = FALSEsilences it.Full suite: 162 pass, 0 fail.