From ab027a6ae2df3fabb851686efe82b7ea2f350fd9 Mon Sep 17 00:00:00 2001 From: Oxan van Leeuwen Date: Tue, 30 Nov 2021 09:35:52 +0100 Subject: [PATCH] Fix too-broad matcher for custom CI script (#2829) --- .github/workflows/matchers/ci-custom.json | 2 +- script/ci-custom.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/matchers/ci-custom.json b/.github/workflows/matchers/ci-custom.json index 9888dbb440..1d5f2551cd 100644 --- a/.github/workflows/matchers/ci-custom.json +++ b/.github/workflows/matchers/ci-custom.json @@ -4,7 +4,7 @@ "owner": "ci-custom", "pattern": [ { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(.*)$", + "regexp": "^(.*):(\\d+):(\\d+):\\s+lint:\\s+(.*)$", "file": 1, "line": 2, "column": 3, diff --git a/script/ci-custom.py b/script/ci-custom.py index de2dfda44d..9acfbcdc23 100755 --- a/script/ci-custom.py +++ b/script/ci-custom.py @@ -660,7 +660,9 @@ for fname in files: run_checks(LINT_POST_CHECKS, "POST") for f, errs in sorted(errors.items()): - err_str = (f"{styled(colorama.Style.BRIGHT, f'{f}:{lineno}:{col}:')} {msg}\n" for lineno, col, msg in errs) + bold = functools.partial(styled, colorama.Style.BRIGHT) + bold_red = functools.partial(styled, (colorama.Style.BRIGHT, colorama.Fore.RED)) + err_str = (f"{bold(f'{f}:{lineno}:{col}:')} {bold_red('lint:')} {msg}\n" for lineno, col, msg in errs) print_error_for_file(f, "\n".join(err_str)) if args.print_slowest: