From 7150e63ee3df0881da833f37d90265db6cc93ab2 Mon Sep 17 00:00:00 2001 From: Dennis Kempin Date: Tue, 13 Sep 2022 17:01:28 +0000 Subject: [PATCH] health-check: Add version check for mdformat On glinux people may have set up the google internal mdformat tool, which is different from the open source mdformat tool. BUG=b:236962138 TEST=./tools/health-check --all markdown_format with PATH updated to use both versions Change-Id: Ia6b783c52195f2edd33eb836333b28f257be8a32 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894236 Reviewed-by: Zihan Chen Commit-Queue: Dennis Kempin --- tools/health-check | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/health-check b/tools/health-check index 8351f61eb2..5e0d78b64c 100755 --- a/tools/health-check +++ b/tools/health-check @@ -61,6 +61,11 @@ def check_crlf_line_endings(_: CheckContext): def check_markdown_format(context: CheckContext): "Runs mdformat on all markdown files." + if "blaze" in mdformat("--version").stdout(): + raise Exception( + "You are using google's mdformat. " + + "Please update your PATH to ensure the pip installed mdformat is available." + ) parallel( *mdformat("--wrap 100", "--check" if not context.fix else "").foreach( context.modified_files