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 e90a0fd  Improve the grammar of RAT check result messages
e90a0fd is described below

commit e90a0fdd962946b1094db10406a1018a8de975fa
Author: Sean B. Palmer <[email protected]>
AuthorDate: Tue Jun 24 18:52:21 2025 +0100

    Improve the grammar of RAT check result messages
---
 atr/tasks/checks/rat.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/atr/tasks/checks/rat.py b/atr/tasks/checks/rat.py
index 4c30693..5ffe721 100644
--- a/atr/tasks/checks/rat.py
+++ b/atr/tasks/checks/rat.py
@@ -545,9 +545,11 @@ def _summary_message(valid: bool, unapproved_licenses: 
int, unknown_licenses: in
     if not valid:
         message = "Found "
         if unapproved_licenses > 0:
-            message += f"{unapproved_licenses} files with unapproved licenses"
+            files = "file" if (unapproved_licenses == 1) else "files"
+            message += f"{unapproved_licenses} {files} with unapproved 
licenses"
             if unknown_licenses > 0:
                 message += " and "
         if unknown_licenses > 0:
-            message += f"{unknown_licenses} files with unknown licenses"
+            files = "file" if (unknown_licenses == 1) else "files"
+            message += f"{unknown_licenses} {files} with unknown licenses"
     return message


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

Reply via email to