Skip to content

Commit

Permalink
switch to cli style
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Nov 12, 2023
1 parent 71c7e31 commit 62e6ff1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Imports:
xmlparsedata (>= 1.0.5)
Suggests:
bookdown,
crayon,
cli,
httr (>= 1.2.1),
jsonlite,
mockery,
Expand Down
12 changes: 6 additions & 6 deletions R/methods.R
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#' @export
format.lint <- function(x, ...) {
if (requireNamespace("crayon", quietly = TRUE)) {
if (requireNamespace("cli", quietly = TRUE)) {
color <- switch(x$type,
warning = crayon::magenta,
error = crayon::red,
style = crayon::blue,
crayon::bold
warning = cli::col_magenta,
error = cli::col_red,
style = cli::col_blue,
cli::style_bold
)
emph <- crayon::bold
emph <- cli::style_bold
} else {
# nocov start
color <- identity
Expand Down

0 comments on commit 62e6ff1

Please sign in to comment.