Skip to content
Snippets Groups Projects
Commit 90d104ba authored by Cyril Roelandt's avatar Cyril Roelandt
Browse files

guix lint: make sure check-patches retrieves patch names.

* guix/lint (check-patches): Test the output of origin-patches.
parent 0c115d8c
No related branches found
No related tags found
No related merge requests found
...@@ -152,10 +152,15 @@ (define (check-patches package) ...@@ -152,10 +152,15 @@ (define (check-patches package)
(name (package-name package)) (name (package-name package))
(full-name (package-full-name package))) (full-name (package-full-name package)))
(if (and patches (if (and patches
(any (lambda (patch) (any (match-lambda
((? string? patch)
(let ((filename (basename patch))) (let ((filename (basename patch)))
(not (or (eq? (string-contains filename name) 0) (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)) patches))
(emit-warning package (emit-warning package
"file names of patches should start with the package name" "file names of patches should start with the package name"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment