guix lint: Make sure a synopsis cannot start with a lower-case article.

* guix/scripts/lint.scm (check-start-article): use "string-ci=?" instead of
  "string=?".
* tests/lint.scm ("synopsis: starts with 'a'",
  "synopsis: starts with 'an'"): New tests.
This commit is contained in:
Cyril Roelandt 2014-09-27 23:04:46 +02:00
parent 8202a51313
commit a00ffdaa17
2 changed files with 20 additions and 2 deletions

View file

@ -148,8 +148,8 @@ Run a set of checkers on the specified package; if none is specified, run the ch
'synopsis)))
(define (check-start-article synopsis)
(if (or (string=? (string-take synopsis 2) "A ")
(string=? (string-take synopsis 3) "An "))
(if (or (string-ci=? (string-take synopsis 2) "A ")
(string-ci=? (string-take synopsis 3) "An "))
(emit-warning package
"no article allowed at the beginning of the synopsis"
'synopsis)))