diff options
author | Leo Famulari <leo@famulari.name> | 2017-03-27 21:19:38 -0400 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2017-03-27 21:19:38 -0400 |
commit | c17383f400d3b942c22ec46b556cad8ca3a2fce1 (patch) | |
tree | f430fdc7b6e41a652b4a0dbdd08050f586e4b24d /guix/scripts | |
parent | b1a8fd2d2cf6bf1b20ba8d26ca6f9a7caef60cbc (diff) | |
parent | 7aeb4ffa5828206f89ec62226863c27f7c1c028d (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/lint.scm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 66c82f0409..811f167067 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org> ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> +;;; Copyright © 2017 Alex Kost <alezost@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -347,10 +348,25 @@ the synopsis") (_ "synopsis should not start with the package name") 'synopsis))) + (define (check-texinfo-markup synopsis) + "Check that SYNOPSIS can be parsed as a Texinfo fragment. If the +markup is valid return a plain-text version of SYNOPSIS, otherwise #f." + (catch #t + (lambda () (texi->plain-text synopsis)) + (lambda (keys . args) + (emit-warning package + (_ "Texinfo markup in synopsis is invalid") + 'synopsis) + #f))) + (define checks - (list check-not-empty check-proper-start check-final-period - check-start-article check-start-with-package-name - check-synopsis-length)) + (list check-not-empty + check-proper-start + check-final-period + check-start-article + check-start-with-package-name + check-synopsis-length + check-texinfo-markup)) (match (package-synopsis package) ((? string? synopsis) |