Skip to content

Commit

Permalink
Check that object has a name
Browse files Browse the repository at this point in the history
Fixes #1490
  • Loading branch information
hadley committed Nov 15, 2023
1 parent a4afa00 commit 968b5b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# roxygen2 (development version)

* `@describeIn()` gives a more informative warning if you use it with an
unsupported type (#1490).

* A friendlier error is thrown when attempting to import non-existing
functions with `@importFrom` (#1409, @MichaelChirico).
* authors in `DESCRIPTION` can now have multiple email addresses (@jmbarbone, #1487).
Expand Down
4 changes: 4 additions & 0 deletions R/rd-describe-in.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ topic_add_describe_in <- function(topic, block, env) {
warn_roxy_tag(tag, "can not be used with @rdname")
return()
}
if (is.null(object_name(block$object))) {
warn_roxy_tag(tag, "not supported with this object type")
return()
}

dest <- find_object(tag$val$name, env)
metadata <- build_minidesc_metadata(block$object, dest)
Expand Down

0 comments on commit 968b5b8

Please sign in to comment.