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

Use cli errors in R/rsplit.R #512

Closed
Tracked by #457
hfrick opened this issue Jul 22, 2024 · 1 comment
Closed
Tracked by #457

Use cli errors in R/rsplit.R #512

hfrick opened this issue Jul 22, 2024 · 1 comment
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day

Comments

@hfrick
Copy link
Member

hfrick commented Jul 22, 2024

Most or all errors thrown in this package are made via rlang::abort(). We are transitioning to cli::cli_abort() to make use of the richer styling options for errors via cli (which calls rlang under the hood). This issue is part of that effort (#457).

It is often sufficient to search for and replace the rlang version with the cli version together with adding a little bit of styling.

Some examples of the styling possibilities are in the general introduction under the section of Inline text formatting. More details on inline formatting and pluralization.

One aspect to watch out for when transitioning from rlang::abort() to cli::cli_abort() are messages pre-assembled from user input as described here.

#499 can serve as an example.

@hfrick hfrick mentioned this issue Jul 22, 2024
11 tasks
@hfrick hfrick changed the title R/rsplit.R Use cli errors in R/rsplit.R Jul 22, 2024
@hfrick hfrick added the tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day label Jul 22, 2024
@hfrick hfrick added the feature a feature request or enhancement label Jul 31, 2024
@hfrick hfrick closed this as completed in 0542408 Aug 15, 2024
hfrick added a commit that referenced this issue Aug 15, 2024
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement tidy-dev-day 🤓 Tidyverse Developer Day rstd.io/tidy-dev-day
Projects
None yet
Development

No branches or pull requests

1 participant