This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/sbp by this push:
     new 9799c8f3 Allow more files at the top level
9799c8f3 is described below

commit 9799c8f3ce23375fcbffb813c17d767ce62c5b43
Author: Sean B. Palmer <[email protected]>
AuthorDate: Fri Mar 20 15:55:44 2026 +0000

    Allow more files at the top level
---
 atr/tasks/checks/paths.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/atr/tasks/checks/paths.py b/atr/tasks/checks/paths.py
index 1d045155..f6425f99 100644
--- a/atr/tasks/checks/paths.py
+++ b/atr/tasks/checks/paths.py
@@ -29,18 +29,15 @@ import atr.tasks.checks as checks
 import atr.user as user
 import atr.util as util
 
+_ALLOWED_TOP_LEVEL_NAMES: Final = ("CHANGES", "LICENSE", "NOTICE", "README", 
"SECURITY")
+_ALLOWED_TOP_LEVEL_SUFFIXES: Final = ("", ".adoc", ".md", ".rst", ".txt")
 _ALLOWED_TOP_LEVEL: Final = frozenset(
-    {
-        "CHANGES",
-        "LICENSE",
-        "NOTICE",
-        "README",
-    }
+    (name + suffix) for name in _ALLOWED_TOP_LEVEL_NAMES for suffix in 
_ALLOWED_TOP_LEVEL_SUFFIXES
 )
 # Release policy fields which this check relies on - used for result caching
 INPUT_POLICY_KEYS: Final[list[str]] = []
 INPUT_EXTRA_ARGS: Final[list[str]] = ["is_podling", "all_files"]
-CHECK_VERSION: Final[str] = "1"
+CHECK_VERSION: Final[str] = "2"
 
 
 async def check(args: checks.FunctionArguments) -> results.Results | None:
@@ -258,7 +255,6 @@ async def _check_path_process_single(  # noqa: C901
                 is_standalone_metadata = True
                 break
 
-    allowed_top_level = _ALLOWED_TOP_LEVEL
     if ext_artifact:
         log.info(f"Checking artifact rules for {full_path}")
         await _check_artifact_rules(base_path, relative_path, relative_paths, 
errors, blockers, is_podling)
@@ -276,7 +272,7 @@ async def _check_path_process_single(  # noqa: C901
         )
     else:
         log.info(f"Checking general rules for {full_path}")
-        if (relative_path.parent == pathlib.Path(".")) and (relative_path.name 
not in allowed_top_level):
+        if (relative_path.parent == pathlib.Path(".")) and (relative_path.name 
not in _ALLOWED_TOP_LEVEL):
             errors.append(f"Unknown top level file: {relative_path.name}")
 
     await _record(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to