[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] guix lint: make sure check-patches retrieves patch names
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 1/5] guix lint: make sure check-patches retrieves patch names. |
Date: |
Sun, 28 Sep 2014 12:08:13 +0200 |
User-agent: |
Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux) |
Cyril Roelandt <address@hidden> skribis:
> * guix/lint (check-patches): Test the output of origin-patches.
> ---
> guix/scripts/lint.scm | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index 83dde9a..0fbec1b 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -152,6 +152,7 @@ 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
> + (every string? patches)
> (any (lambda (patch)
> (let ((filename (basename patch)))
> (not (or (eq? (string-contains filename name) 0)
Instead of requiring every item in ‘patches’ to be a file name, what
about testing each item individually:
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"
Thanks,
Ludo’.
- [PATCH 0/5] Add, fix and improve checkers in guix lint., Cyril Roelandt, 2014/09/27
- [PATCH 1/5] guix lint: make sure check-patches retrieves patch names., Cyril Roelandt, 2014/09/27
- Re: [PATCH 1/5] guix lint: make sure check-patches retrieves patch names.,
Ludovic Courtès <=
- [PATCH 2/5] guix lint: Make sure synopses are not too long., Cyril Roelandt, 2014/09/27
- [PATCH 4/5] guix lint: Make sure a synopsis cannot start with a lower-case article., Cyril Roelandt, 2014/09/27
- [PATCH 5/5] guix lint: make sure synopses do not start with the package name., Cyril Roelandt, 2014/09/27
- [PATCH 3/5] guix lint: check whether descriptions and synopses start with an upper-case letter., Cyril Roelandt, 2014/09/27
- Re: [PATCH 0/5] Add, fix and improve checkers in guix lint., Andreas Enge, 2014/09/28