diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-11-28 15:52:01 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-11-28 15:52:01 +0100 |
commit | 0a154c15a81ef80bf512a38ae8473a5bc511302b (patch) | |
tree | fdabee133e7a1abf82e7bfbdb6004f11c4a40d45 /guix | |
parent | eef01cfe8eac8dee8ecf727e4ca459ae065e15ea (diff) |
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.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/lint.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 7300e55de2..1b43b0a63c 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 |