mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
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 <zihanchen@google.com> Commit-Queue: Dennis Kempin <denniskempin@google.com>
This commit is contained in:
parent
e27dde0caa
commit
7150e63ee3
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ def check_crlf_line_endings(_: CheckContext):
|
||||||
|
|
||||||
def check_markdown_format(context: CheckContext):
|
def check_markdown_format(context: CheckContext):
|
||||||
"Runs mdformat on all markdown files."
|
"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(
|
parallel(
|
||||||
*mdformat("--wrap 100", "--check" if not context.fix else "").foreach(
|
*mdformat("--wrap 100", "--check" if not context.fix else "").foreach(
|
||||||
context.modified_files
|
context.modified_files
|
||||||
|
|
Loading…
Reference in a new issue