Skip to content

Commit

Permalink
Improve check for unexported S3 methods
Browse files Browse the repository at this point in the history
Fixes #1593
  • Loading branch information
jranke committed Feb 9, 2024
1 parent db4dd9a commit 30a4595
Showing 1 changed file with 2 additions and 1 deletion.
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 30a4595

Please sign in to comment.