diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-07-02 18:00:34 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-07-02 22:21:07 +0200 |
commit | 4715ad387d814c8fe8a77d7fd850f1b9199a8a6d (patch) | |
tree | fd8e152e7e9b6da4e3151801498b5b8d521efc5f | |
parent | 07a30c0092260f1e1edb2a32da4f94b83a26ef21 (diff) | |
download | qutebrowser-4715ad387d814c8fe8a77d7fd850f1b9199a8a6d.tar.gz qutebrowser-4715ad387d814c8fe8a77d7fd850f1b9199a8a6d.zip |
ci: Make it possible to set all attributes of problem matchers
-rw-r--r-- | scripts/dev/ci/problemmatchers.py | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/scripts/dev/ci/problemmatchers.py b/scripts/dev/ci/problemmatchers.py index 6ade825dd..28a22ea38 100644 --- a/scripts/dev/ci/problemmatchers.py +++ b/scripts/dev/ci/problemmatchers.py @@ -32,17 +32,19 @@ import json MATCHERS = { - "shellcheck": [ - { - "regexp": r"^(.+):(\d+):(\d+):\s(note|warning|error):\s(.*)\s\[(SC\d+)\]$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5, - "code": 6, - }, - ], + "shellcheck": { + "pattern": [ + { + "regexp": r"^(.+):(\d+):(\d+):\s(note|warning|error):\s(.*)\s\[(SC\d+)\]$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5, + "code": 6, + }, + ], + }, } @@ -56,14 +58,9 @@ def main(): # at the point this script exits. output_dir = pathlib.Path(tempfile.mkdtemp(suffix='-ghmatchers')) - data = { - 'problemMatcher': [ - { - 'owner': testenv, - 'pattern': MATCHERS[testenv], - }, - ], - } + matcher_data = MATCHERS[testenv] + matcher_data['owner'] = testenv + data = {'problemMatcher': [matcher_data]} output_file = output_dir / '{}.json'.format(testenv) with output_file.open('w', encoding='utf-8') as f: |