Skip to content

Commit

Permalink
Can't use cli_inform() since covr doesn't import rlang.
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Dec 12, 2024
1 parent 42822b7 commit f56374d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/summary_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,24 @@ print.coverage <- function(x, group = c("filename", "functions"), by = "line", .

overall_percentage <- percent_coverage(df, by = by)

cli::cli_inform(paste0(
msg <- cli::format_message(paste0(
cli::style_bold(
"{attr(x, 'package')$package} {to_title(type)} Coverage: "
),
format_percentage(overall_percentage)
))
message(msg)
by_coverage <- percents[order(percents,
names(percents))]

for (i in seq_along(by_coverage)) {
cli::cli_inform(
msg <- cli::format_message(
paste0(
cli::style_bold(names(by_coverage)[i], ": "),
format_percentage(by_coverage[i])
)
)
message(msg)
}
invisible(x)
}
Expand Down

0 comments on commit f56374d

Please sign in to comment.