You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/08/31 16:27:59 UTC
(tooling-trusted-releases) branch arm updated: #1544 - add classifier-style SBOM matching
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/arm by this push:
new 46784618 #1544 - add classifier-style SBOM matching
46784618 is described below
commit 467846186c6618761932f412cb6886c83ac01c77
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Mon Aug 31 17:27:33 2026 +0100
#1544 - add classifier-style SBOM matching
---
atr/tasks/checks/paths.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/atr/tasks/checks/paths.py b/atr/tasks/checks/paths.py
index eb83d904..3382aedc 100644
--- a/atr/tasks/checks/paths.py
+++ b/atr/tasks/checks/paths.py
@@ -266,10 +266,18 @@ async def _check_metadata_rules(
if (ext_metadata not in {".asc", ".sha256", ".sha512", ".md5", ".sha", ".sha1"}) and (not is_cyclonedx_sbom):
warnings.append("The use of this metadata file is discouraged")
- # Check whether the corresponding artifact exists
+ # Check whether the corresponding artifact exists.
artifact_path_base = str(relative_path).removesuffix(ext_metadata)
if is_standalone:
- has_artifact = any((p.startswith(artifact_path_base + ".") and analysis.is_artifact(p)) for p in relative_paths)
+ has_artifact = any(
+ analysis.is_artifact(p)
+ and (
+ (p == artifact_path_base)
+ or p.startswith(artifact_path_base + ".") # non-maven, suffixed-style
+ or p.startswith(artifact_path_base + "-") # maven, classifier-style
+ )
+ for p in relative_paths
+ )
if not has_artifact:
errors.append(
f"Metadata file exists but no corresponding artifact with base '{artifact_path_base}' was found"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org