mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
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?'.
This commit is contained in:
parent
431e5f5a3e
commit
105c260f00
1 changed files with 12 additions and 6 deletions
|
@ -23,6 +23,7 @@ (define-module (guix scripts lint)
|
||||||
#:use-module (guix records)
|
#:use-module (guix records)
|
||||||
#:use-module (guix ui)
|
#:use-module (guix ui)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
#:use-module (guix gnu-maintenance)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
|
@ -154,12 +155,17 @@ (define (check-final-period synopsis)
|
||||||
"no period allowed at the end of the synopsis"
|
"no period allowed at the end of the synopsis"
|
||||||
'synopsis)))
|
'synopsis)))
|
||||||
|
|
||||||
(define (check-start-article 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)
|
(when (or (string-prefix-ci? "A " synopsis)
|
||||||
(string-prefix-ci? "An " synopsis))
|
(string-prefix-ci? "An " synopsis))
|
||||||
(emit-warning package
|
(emit-warning package
|
||||||
"no article allowed at the beginning of the synopsis"
|
"no article allowed at the beginning of the synopsis"
|
||||||
'synopsis)))
|
'synopsis)))))
|
||||||
|
|
||||||
(define (check-synopsis-length synopsis)
|
(define (check-synopsis-length synopsis)
|
||||||
(when (>= (string-length synopsis) 80)
|
(when (>= (string-length synopsis) 80)
|
||||||
|
|
Loading…
Reference in a new issue