diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-11-07 17:34:15 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-07 17:52:11 +0100 |
commit | 105c260f00479d404b140be534efb21f9f3d17fe (patch) | |
tree | d56d10d32e68eadb3c454e4c9da1ebf2c2b47389 | |
parent | 431e5f5a3ea1da2a0e1c58990d3c8f2860dbe7d0 (diff) | |
download | gnu-guix-105c260f00479d404b140be534efb21f9f3d17fe.tar gnu-guix-105c260f00479d404b140be534efb21f9f3d17fe.tar.gz |
lint: Skip starting-article test for the synopses of GNU packages.
* guix/scripts/lint.scm (check-synopsis-style)[check-start-article]:
Change to (const #t) when PACKAGE matches 'gnu-package?'.
-rw-r--r-- | guix/scripts/lint.scm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index d6bfffda13..350a35222c 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -23,6 +23,7 @@ #:use-module (guix records) #:use-module (guix ui) #:use-module (guix utils) + #:use-module (guix gnu-maintenance) #:use-module (gnu packages) #:use-module (ice-9 match) #:use-module (ice-9 regex) @@ -154,12 +155,17 @@ line." "no period allowed at the end of the synopsis" 'synopsis))) - (define (check-start-article synopsis) - (when (or (string-prefix-ci? "A " synopsis) - (string-prefix-ci? "An " synopsis)) - (emit-warning package - "no article allowed at the beginning of the synopsis" - 'synopsis))) + (define check-start-article + ;; Skip this check for GNU packages, as suggested by Karl Berry's reply to + ;; <http://lists.gnu.org/archive/html/bug-womb/2014-11/msg00000.html>. + (if (false-if-exception (gnu-package? package)) + (const #t) + (lambda (synopsis) + (when (or (string-prefix-ci? "A " synopsis) + (string-prefix-ci? "An " synopsis)) + (emit-warning package + "no article allowed at the beginning of the synopsis" + 'synopsis))))) (define (check-synopsis-length synopsis) (when (>= (string-length synopsis) 80) |