From c2637bdb675563e408cb432bc7587c7bdbef06e0 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 23 May 2022 10:32:57 -0500 Subject: [PATCH] Mildly improve visual hierarchy of devtools::check() (#2423) --- R/check.R | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/R/check.R b/R/check.R index d1bf16818..f7b13f9cf 100644 --- a/R/check.R +++ b/R/check.R @@ -86,15 +86,17 @@ check <- function(pkg = ".", document <- document %||% can_document(pkg) if (document) { + if (!quiet) { + cat_rule("Documenting", col = "cyan", line = 2) + } document(pkg, quiet = quiet) + if (!quiet) { + cli::cat_line() + } } if (!quiet) { - cat_rule( - left = "Building", - right = pkg$package, - col = "cyan" - ) + cat_rule("Building", col = "cyan", line = 2) show_env_vars(pkgbuild::compiler_flags(FALSE)) } @@ -207,12 +209,8 @@ check_built <- function(path = NULL, cran = TRUE, env_vars <- check_env_vars(cran, remote, incoming, force_suggests, env_vars) if (!quiet) { - cat_rule( - left = "Checking", - right = pkgname, - col = "cyan" - ) - show_env_vars(env_vars, trailing = FALSE) + cat_rule("Checking", col = "cyan", line = 2) + show_env_vars(env_vars) } withr::with_envvar(env_vars, action = "replace", { @@ -245,10 +243,7 @@ aspell_env_var <- function() { }, error = function(e) character()) } -show_env_vars <- function(env_vars, trailing = TRUE) { +show_env_vars <- function(env_vars) { cli::cat_line("Setting env vars:", col = "darkgrey") cat_bullet(paste0(format(names(env_vars)), ": ", unname(env_vars)), col = "darkgrey") - if (trailing) { - cat_rule(col = "cyan") - } }