[flang-commits] [flang] [flang] Reorder messages wrt line number before diff(actual, expect) (PR #186812)
via flang-commits
flang-commits at lists.llvm.org
Mon Mar 16 07:50:23 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r origin/main...HEAD flang/test/Semantics/test_errors.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- test_errors.py 2026-03-16 14:40:07.000000 +0000
+++ test_errors.py 2026-03-16 14:49:48.174185 +0000
@@ -82,13 +82,11 @@
sys.exit(1)
# Cleans up the output from the compilation process to be easier to process
actual_per_line = dict()
for line in log.split("\n"):
- m = re.search(
- r"[^:]*:(\d+:).*(?:error|warning|portability|because):(.*)", line
- )
+ m = re.search(r"[^:]*:(\d+:).*(?:error|warning|portability|because):(.*)", line)
if m:
if re.search(r"warning: .*fold.*host", line):
continue # ignore host-dependent folding warnings
line_colon = m.expand(r"\1")
actual_per_line[line_colon] = actual_per_line.get(line_colon, []) + [
``````````
</details>
https://github.com/llvm/llvm-project/pull/186812
More information about the flang-commits
mailing list