Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Clickable links in CLI output #1116

Open
olivroy opened this issue May 5, 2023 · 2 comments
Open

FR: Clickable links in CLI output #1116

olivroy opened this issue May 5, 2023 · 2 comments

Comments

@olivroy
Copy link
Contributor

olivroy commented May 5, 2023

I was wondering if it would be possible to have a clickable link to a styler error, using cli.

cli::cli_text("{.file file.R:2}")

Creates a link to file.R at line 2.
https://cli.r-lib.org/reference/links.html?q=file%20lin#line-and-column-numbers

It could be quite handy for a large file

@lorenzwalthert
Copy link
Collaborator

lorenzwalthert commented May 24, 2023

I agree this would be handy. Also in the ouptut of style_pkg() and the like, where all files are enumerated. Even more generally, having clickable output might be desirable, e.g. also in styler:::ask_to_switch_to_non_default_cache_root_impl()'s output (to help file) and others. Contributions welcome.

@lorenzwalthert lorenzwalthert changed the title FR: use hyperlink to indicate where styler failed. FR: Clickable links in CLI output May 24, 2023
@olivroy
Copy link
Contributor Author

olivroy commented May 24, 2023

Hi,

I would like to contribute, but I don't really know how. I started looking at styler's source code and CONTRIBUTING.

meanwhile, I opened a PR with cosmetic changes to code (#1122), but nothing significant done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants