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
.
This commit is contained in:
parent
15d5ca1356
commit
5d8d8f3b0a
|
@ -146,11 +146,11 @@ monad."
|
||||||
(define (check-texinfo-markup description)
|
(define (check-texinfo-markup description)
|
||||||
"Check that DESCRIPTION can be parsed as a Texinfo fragment. If the
|
"Check that DESCRIPTION can be parsed as a Texinfo fragment. If the
|
||||||
markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
|
markup is valid return a plain-text version of DESCRIPTION, otherwise #f."
|
||||||
(catch 'parser-error
|
(unless (false-if-exception (texi->plain-text description))
|
||||||
(lambda () (texi->plain-text description))
|
(emit-warning package
|
||||||
(lambda (keys . args)
|
(_ "Texinfo markup in description is invalid")
|
||||||
(emit-warning package (_ "Texinfo markup in description is invalid"))
|
'description)
|
||||||
#f)))
|
#f))
|
||||||
|
|
||||||
(define (check-proper-start description)
|
(define (check-proper-start description)
|
||||||
(unless (or (properly-starts-sentence? description)
|
(unless (or (properly-starts-sentence? description)
|
||||||
|
|
Loading…
Reference in New Issue