Skip to content

Use hyperlink in warn_roxy_tag() + warn_roxy_block() #1323

@hadley

Description

@hadley

Something like this:

warn_roxy_tag <- function(tag, message, ...) {
  link <- cli::style_hyperlink(
    paste0(basename(tag$file), ":", tag$line),
    paste0("file://", tag$file),
    params = c(line = tag$line, col = 1)
  )

  message[[1]] <- paste0(
    "[", link, "]", " @", tag$tag, " ",
    if (is.null(tag$raw)) ("(automatically generated) "),
    message[[1]]
  )
  cli::cli_warn(message, ..., .envir = parent.frame())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions