~ruther/guix-local

687f4e22e666aa06dfac7344ff652fb51e47a4b0 — Gabriel Wicki 1 year, 11 months ago f28c320
lint: Allow texinfo markup at beginning of synopsis.

* guix/lint.scm(check-synopsis-style)[check-proper-start]: Add condition.
* tests/lint.scm: Add test case.

Change-Id: I2509b3a4e7e51c6a274697ceb5f776c22e27c5f9
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2 files changed, 8 insertions(+), 1 deletions(-)

M guix/lint.scm
M tests/lint.scm
M guix/lint.scm => guix/lint.scm +2 -1
@@ 743,7 743,8 @@ the synopsis")
        '()))

  (define (check-proper-start synopsis)
    (if (properly-starts-sentence? synopsis)
    (if (or (properly-starts-sentence? synopsis)
            (starts-with-texinfo-markup? synopsis))
        '()
        (list
         (make-warning package

M tests/lint.scm => tests/lint.scm +6 -0
@@ 307,6 307,12 @@
      (check-synopsis-style pkg)))
   string<?))

(test-equal "synopsis: starts with texinfo markup"
  '()
  (let ((pkg (dummy-package "x"
                            (synopsis "@code{help}"))))
    (check-synopsis-style pkg)))

(test-equal "synopsis: too long"
  "synopsis should be less than 80 characters long"
  (single-lint-warning-message