You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/06/24 17:52:37 UTC

(tooling-trusted-release) branch main updated: Improve the grammar of RAT check result messages

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 <se...@miscoranda.com>
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: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org