[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCHv2 1/5] guix lint: make sure check-patches retrieves patch names.
From: |
Cyril Roelandt |
Subject: |
[PATCHv2 1/5] guix lint: make sure check-patches retrieves patch names. |
Date: |
Mon, 6 Oct 2014 02:26:12 +0200 |
* guix/lint (check-patches): Test the output of origin-patches.
---
guix/scripts/lint.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 83dde9a..b613737 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -152,10 +152,15 @@ Run a set of checkers on the specified package; if none
is specified, run the ch
(name (package-name package))
(full-name (package-full-name package)))
(if (and patches
- (any (lambda (patch)
+ (any (match-lambda
+ ((? string? patch)
(let ((filename (basename patch)))
(not (or (eq? (string-contains filename name) 0)
- (eq? (string-contains filename full-name) 0)))))
+ (eq? (string-contains filename full-name)
+ 0)))))
+ (_
+ ;; This must be an <origin> or something like that.
+ #f))
patches))
(emit-warning package
"file names of patches should start with the package name"
--
1.8.4.rc3
- [PATCHv2 1/5] guix lint: make sure check-patches retrieves patch names.,
Cyril Roelandt <=