guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: lint: Rename 'check-patches' to 'check-patch-file-names'.


From: Ludovic Courtès
Subject: 01/03: lint: Rename 'check-patches' to 'check-patch-file-names'.
Date: Fri, 10 Apr 2015 08:34:19 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 56b1b74c903c17b03ef5b0052a1144bb1e55685f
Author: Ludovic Courtès <address@hidden>
Date:   Fri Apr 10 10:08:49 2015 +0200

    lint: Rename 'check-patches' to 'check-patch-file-names'.
    
    * guix/scripts/lint.scm (check-patches): Rename to...
      (check-patch-file-names): ... this.  Rename 'filename' to 'file'.
      (%checkers): Adjust accordingly.
    * tests/lint.scm ("patches: file names"): Likewise.
---
 guix/scripts/lint.scm |   16 ++++++++--------
 tests/lint.scm        |    2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index c40d76b..543b3dd 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -45,7 +45,7 @@
   #:export (guix-lint
             check-description-style
             check-inputs-should-be-native
-            check-patches
+            check-patch-file-names
             check-synopsis-style
             check-home-page
             check-source))
@@ -348,7 +348,7 @@ warning for PACKAGE mentionning the FIELD."
                                     (package-home-page package))
                     'home-page)))))
 
-(define (check-patches package)
+(define (check-patch-file-names package)
   ;; Emit a warning if the patches requires by PACKAGE are badly named.
   (let ((patches   (and=> (package-source package) origin-patches))
         (name      (package-name package))
@@ -356,9 +356,9 @@ warning for PACKAGE mentionning the FIELD."
     (when (and patches
                (any (match-lambda
                      ((? string? patch)
-                      (let ((filename (basename patch)))
-                        (not (or (eq? (string-contains filename name) 0)
-                                 (eq? (string-contains filename full-name)
+                      (let ((file (basename patch)))
+                        (not (or (eq? (string-contains file name) 0)
+                                 (eq? (string-contains file full-name)
                                       0)))))
                      (_
                       ;; This must be an <origin> or something like that.
@@ -367,7 +367,7 @@ warning for PACKAGE mentionning the FIELD."
       (emit-warning package
                     (_ "file names of patches should start with \
 the package name")
-                    'patches))))
+                    'patch-file-names))))
 
 (define (escape-quotes str)
   "Replace any quote character in STR by an escaped quote character."
@@ -455,9 +455,9 @@ descriptions maintained upstream."
      (description "Identify inputs that should be native inputs")
      (check       check-inputs-should-be-native))
    (lint-checker
-     (name        'patch-filenames)
+     (name        'patch-file-names)
      (description "Validate file names of patches")
-     (check       check-patches))
+     (check       check-patch-file-names))
    (lint-checker
      (name        'home-page)
      (description "Validate home-page URLs")
diff --git a/tests/lint.scm b/tests/lint.scm
index 2312b80..047f278 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -301,7 +301,7 @@ requests."
                        (uri "someurl")
                        (sha256 "somesha")
                        (patches (list "/path/to/y.patch")))))))
-         (check-patches pkg)))
+         (check-patch-file-names pkg)))
      "file names of patches should start with the package name")))
 
 (test-assert "home-page: wrong home-page"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]