guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: lint: Adjust file-name length test for out-of-tree file names.


From: Ludovic Courtès
Subject: 01/01: lint: Adjust file-name length test for out-of-tree file names.
Date: Tue, 28 Nov 2017 09:52:40 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 0a154c15a81ef80bf512a38ae8473a5bc511302b
Author: Ludovic Courtès <address@hidden>
Date:   Tue Nov 28 15:52:01 2017 +0100

    lint: Adjust file-name length test for out-of-tree file names.
    
    * guix/scripts/lint.scm (check-patch-file-names): Adjust
    file-name-length calculation.
---
 guix/scripts/lint.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 7300e55..1b43b0a 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -618,7 +618,10 @@ patch could not be found."
           (max    99))
       (for-each (match-lambda
                   ((? string? patch)
-                   (when (> (+ margin (- (string-length patch) prefix))
+                   (when (> (+ margin (if (string-prefix? %distro-directory
+                                                          patch)
+                                          (- (string-length patch) prefix)
+                                          (string-length patch)))
                             max)
                      (emit-warning
                       package



reply via email to

[Prev in Thread] Current Thread [Next in Thread]