diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2014-09-27 21:32:27 +0200 |
---|---|---|
committer | Cyril Roelandt <tipecaml@gmail.com> | 2014-10-08 03:08:19 +0200 |
commit | 90d104ba82dca16203448da57523d2a7b36be040 (patch) | |
tree | a7fb8ff4c8b03c55d67840a95be9a8ecb2891425 | |
parent | 0c115d8c64b6feec00c142def34242d95aba5283 (diff) | |
download | guix-90d104ba82dca16203448da57523d2a7b36be040.tar guix-90d104ba82dca16203448da57523d2a7b36be040.tar.gz |
guix lint: make sure check-patches retrieves patch names.
* guix/lint (check-patches): Test the output of origin-patches.
-rw-r--r-- | guix/scripts/lint.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 83dde9a1a1..b61373760c 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" |