diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/flake2tasks.py | 9 | ||||
-rwxr-xr-x | scripts/shiboken2tasks.py | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/scripts/flake2tasks.py b/scripts/flake2tasks.py index f84ea8c71e1..6b6517a2ffc 100755 --- a/scripts/flake2tasks.py +++ b/scripts/flake2tasks.py @@ -14,7 +14,8 @@ import sys import re if __name__ == '__main__': - pattern = re.compile(r'^([^:]+):(\d+):\d+: E\d+ (.*)$') + pattern = re.compile(r'^([^:]+):(\d+):\d+: (.*)$') + n = 0 while True: line = sys.stdin.readline().rstrip() if not line: @@ -24,5 +25,7 @@ if __name__ == '__main__': file_name = match.group(1).replace('\\', '/') line_number = match.group(2) text = match.group(3) - output = "{}\t{}\twarn\t{}".format(file_name, line_number, text) - print(output) + print(f"{file_name}\t{line_number}\twarn\t{text}") + n += 1 + if n: + print(f"{n} issue(s) found.", file=sys.stderr) diff --git a/scripts/shiboken2tasks.py b/scripts/shiboken2tasks.py index d353c9c02f7..6598d0ac716 100755 --- a/scripts/shiboken2tasks.py +++ b/scripts/shiboken2tasks.py @@ -16,6 +16,7 @@ if __name__ == '__main__': # qt.shiboken: (<module>) <file>:<line>:[<column>:] text # file might be c:\ on Windows pattern = re.compile(r'^qt\.shiboken: \(([^)]+)\) (..[^:]+):(\d+):(?:\d+:)? (.*)$') + n = 0 while True: line = sys.stdin.readline() if not line: @@ -26,6 +27,7 @@ if __name__ == '__main__': file_name = match.group(2).replace('\\', '/') line_number = match.group(3) text = match.group(4) - output = "{}\t{}\twarn\t{}: {}".format(file_name, line_number, - module, text) - print(output) + print(f"{file_name}\t{line_number}\twarn\t{module}: {text}") + n += 1 + if n: + print(f"{n} issue(s) found.", file=sys.stderr) |