i.e. in Positron, output looks like this

It would be great if hyperlinks are available, but not source markers (i.e. cli::ansi_has_hyperlink_support() && (!requireNamespace("rstudioapi") || !rstudioapi::hasFun("sourceMarkers") ) then we could just use
paths <- c("tests/spelling:1:1", "tests/spelling:1:2")
paths2 <- paste0("{.path ", paths, "}")
paths3 <- unlist(lapply(paths2, cli::format_inline))
cat(paths3, sep = "\n")
I am however not sure where to put this condition, I tried in
|
} else if (in_github_actions() && !in_pkgdown()) { |
|
github_actions_log_lints(x, project_dir = github_annotation_project_dir) |
|
} else { |
|
lapply(x, print, ...) |
|
} |
} else if (in_github_actions() && !in_pkgdown()) {
github_actions_log_lints(x, project_dir = github_annotation_project_dir)
} else if (cli::has_hyperlink_support()) {
# Do some modification here?
} else {
lapply(x, print, ...)
}
But it didn't seem to work
This should happen in the print method to make sure no output is problematic.
I think it can happen in format.lint(). I may come up with a PR shortly.
i.e. in Positron, output looks like this

It would be great if hyperlinks are available, but not source markers (i.e.
cli::ansi_has_hyperlink_support() && (!requireNamespace("rstudioapi") || !rstudioapi::hasFun("sourceMarkers")) then we could just useI am however not sure where to put this condition, I tried in
lintr/R/methods.R
Lines 95 to 99 in 8d96145
But it didn't seem to work
This should happen in the print method to make sure no output is problematic.
I think it can happen in
format.lint(). I may come up with a PR shortly.