This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 65ff630 Split apart path errors and warnings to improve reporting
65ff630 is described below
commit 65ff630b174161ef00c0e852b7fc677273218ca5
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon May 12 16:20:58 2025 +0100
Split apart path errors and warnings to improve reporting
---
atr/tasks/checks/paths.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/atr/tasks/checks/paths.py b/atr/tasks/checks/paths.py
index d081d08..b96c77f 100644
--- a/atr/tasks/checks/paths.py
+++ b/atr/tasks/checks/paths.py
@@ -180,12 +180,10 @@ async def _check_path_process_single(
if (relative_path.parent == pathlib.Path(".")) and (relative_path.name
not in allowed_top_level):
warnings.append(f"Unknown top level file: {relative_path.name}")
- # Must aggregate errors and aggregate warnings otherwise they will be
removed by afresh=True
- # Alternatively we could call Check.clear() manually
- if errors:
- await recorder_errors.failure("; ".join(errors), {"errors": errors},
primary_rel_path=relative_path_str)
- if warnings:
- await recorder_warnings.warning("; ".join(warnings), {"warnings":
warnings}, primary_rel_path=relative_path_str)
+ for error in errors:
+ await recorder_errors.failure(error, {},
primary_rel_path=relative_path_str)
+ for warning in warnings:
+ await recorder_warnings.warning(warning, {},
primary_rel_path=relative_path_str)
if not (errors or warnings):
await recorder_success.success(
"Path structure and naming conventions conform to policy", {},
primary_rel_path=relative_path_str
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]