From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <1412555172-10106-1-git-send-email-tipecaml@gmail.com> References: <87mw9kawhe.fsf@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xaw8D-0006h1-7o for guix-devel@gnu.org; Sun, 05 Oct 2014 20:26:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xaw84-0004bI-6I for guix-devel@gnu.org; Sun, 05 Oct 2014 20:26:29 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:42810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xaw83-0004b8-Vm for guix-devel@gnu.org; Sun, 05 Oct 2014 20:26:20 -0400 Received: by mail-wi0-f176.google.com with SMTP id hi2so3095848wib.9 for ; Sun, 05 Oct 2014 17:26:19 -0700 (PDT) In-Reply-To: <87mw9kawhe.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * 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 or something like that. + #f)) patches)) (emit-warning package "file names of patches should start with the package name" -- 1.8.4.rc3