Fix too-broad matcher for custom CI script (#2829)

This commit is contained in:
Oxan van Leeuwen 2021-11-30 09:35:52 +01:00 committed by GitHub
parent 556d071e7f
commit ab027a6ae2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"owner": "ci-custom", "owner": "ci-custom",
"pattern": [ "pattern": [
{ {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(.*)$", "regexp": "^(.*):(\\d+):(\\d+):\\s+lint:\\s+(.*)$",
"file": 1, "file": 1,
"line": 2, "line": 2,
"column": 3, "column": 3,

View file

@ -660,7 +660,9 @@ for fname in files:
run_checks(LINT_POST_CHECKS, "POST") run_checks(LINT_POST_CHECKS, "POST")
for f, errs in sorted(errors.items()): 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)) print_error_for_file(f, "\n".join(err_str))
if args.print_slowest: if args.print_slowest: