Skip to content

Commit

Permalink
Improve check for unexported S3 methods (#1594)
Browse files Browse the repository at this point in the history
Fixes #1593
  • Loading branch information
jranke authored Jul 10, 2024
1 parent 12c3555 commit 7c12664
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# roxygen2 (development version)

* The check for unexported S3 methods was improved, so it does not hang any more
if a largish data object is in the package (#1593, @jranke).

* Custom [`@family`
titles](https://roxygen2.r-lib.org/articles/index-crossref.html) now support
Markdown syntax (#1608, @salim-b).

# roxygen2 7.3.2

* `@includeRmd` now additionally sets `options(cli.hyperlink = FALSE)` to make
Expand Down
3 changes: 2 additions & 1 deletion R/namespace.R
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,9 @@ warn_missing_s3_exports <- function(blocks, env) {

s3blocks <- blocks[map_lgl(blocks, block_has_tags, c("export", "exportS3Method"))]
s3objects <- map(blocks, function(block) block$object$value)
s3functions <- Filter(is.function, s3objects)

undocumented <- methods[!methods %in% s3objects]
undocumented <- methods[!methods %in% s3functions]
srcrefs <- map(undocumented, attr, "srcref")

map2(undocumented, names(undocumented), function(fun, name) {
Expand Down

0 comments on commit 7c12664

Please sign in to comment.