From b78c7130e9986ce41284f33a0803ecdf6dd6affd Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 10 Nov 2023 13:40:39 -0500 Subject: fix: improve `deno doc --lint` error messages (#21156) This also updates deno_graph, which has the JSR change to use "exports". It's not yet useful atm, so I've made this PR a fix about the deno doc --lint error message improvements. I'll do a follow-up PR that adds exports to the deno.json --- cli/tools/doc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tools/doc.rs') diff --git a/cli/tools/doc.rs b/cli/tools/doc.rs index 75a559af1..ff8b8d62e 100644 --- a/cli/tools/doc.rs +++ b/cli/tools/doc.rs @@ -264,7 +264,7 @@ fn check_diagnostics(diagnostics: &[DocDiagnostic]) -> Result<(), AnyError> { for (line, diagnostics_by_col) in diagnostics_by_lc { for (col, diagnostics) in diagnostics_by_col { for diagnostic in diagnostics { - log::warn!("{}", diagnostic.kind); + log::warn!("{}", diagnostic.message()); } log::warn!( " at {}:{}:{}\n", @@ -276,7 +276,7 @@ fn check_diagnostics(diagnostics: &[DocDiagnostic]) -> Result<(), AnyError> { } } bail!( - "Found {} documentation diagnostic{}.", + "Found {} documentation lint error{}.", colors::bold(diagnostics.len().to_string()), if diagnostics.len() == 1 { "" } else { "s" } ); -- cgit v1.2.3