aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@openmailbox.org>2015-09-25 00:37:36 +0200
committerMathieu Lirzin <mthl@openmailbox.org>2015-09-26 15:10:13 +0200
commit5d8d8f3b0a07edb3bd435830b076749f906537d8 (patch)
treed14a5fcb0f0974bda8a5f25e66af7c8ac53a769b /guix/scripts
parent15d5ca135673a06d94ba6e5d0f591eb87940714f (diff)
downloadgnu-guix-5d8d8f3b0a07edb3bd435830b076749f906537d8.tar
gnu-guix-5d8d8f3b0a07edb3bd435830b076749f906537d8.tar.gz
lint: Improve 'check-texinfo-markup'.
* guix/scripts/lint.scm (check-description-style): Set 'field' parameter when emitting a warning in 'check-texinfo-markup'. Catch any error that may occur in during the 'texi->plain-text' conversion. This is a followup to commit 2748ee3.
Diffstat (limited to 'guix/scripts')
-rw-r--r--guix/scripts/lint.scm10
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index b0427f75f4..0adb3bf179 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -146,11 +146,11 @@ monad."
(define (check-texinfo-markup description)
"Check that DESCRIPTION can be parsed as a Texinfo fragment. If the
markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
- (catch 'parser-error
- (lambda () (texi->plain-text description))
- (lambda (keys . args)
- (emit-warning package (_ "Texinfo markup in description is invalid"))
- #f)))
+ (unless (false-if-exception (texi->plain-text description))
+ (emit-warning package
+ (_ "Texinfo markup in description is invalid")
+ 'description)
+ #f))
(define (check-proper-start description)
(unless (or (properly-starts-sentence? description)