Repository navigation
fix(r-cran-extrachecks): exempt @export-only S3 methods from docs checks - #95
Merged
gadenbuie merged 2 commits intoOct 7, 2026
Conversation
Roxygen2 blocks containing only `#' @export` generate no .Rd file, so there is nothing for CRAN documentation checks to inspect. Registered S3 methods are also excluded from R CMD check's undocumented-objects check, so methods following the `print.my_class()` pattern do not need `@return` or `@examples`. Clarify the skill's documentation rules, examples guidance, workflow step, and checklist to reflect this. Also note that the exemption is void once any documentation content is added to the block, and that newly exported S3 generics still require full documentation. Fixes #63
@export-only S3 methods from docs checks
gadenbuie
deleted the
fix/63-cran-extrachecks-clarify-rules-on-exported-generic-functions
branch
October 7, 2026 17:36
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.
Summary
Clarifies the
r-cran-extrachecksskill's documentation rules so it stops flagging exported S3 methods that are documented only with#' @exportas missing@return/@examples(reported in #63).Roxygen2 only generates an
.Rdfile when a block contains documentation content. A block with only#' @exportadds the function to theNAMESPACEwithout producing an.Rd, so CRAN's documentation checks have nothing to inspect.R CMD check's undocumented-objects check also excludes registered S3 methods, so the conventionalprint.my_class()pattern passes as-is.What changed
.Rdfile" clarification with theprint.my_class()example, plus guardrails:@export/@exportS3Method— adding any documentation content (title,@param,@rdname,@describeIn) makes roxygen2 generate an.Rdand all rules apply again@return/@examples@rdname/@describeInfollow the generic's rules — required tags once per.Rd.Rdfiles; added items for the S3-method exemption and S3-generics-with-full-docs checksSkill remains within token limits (475 lines, ~3.9k tokens).
Fixes #63