> Mathieu Lirzin <m...@openmailbox.org> skribis:
>
>> From 429ff285609120c4135eb64f1d6911924a24f5e6 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <m...@openmailbox.org>
>> Date: Fri, 25 Sep 2015 00:37:36 +0200
>> Subject: [PATCH] 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.

I should have tested my patch before pushing it :(

Sorry about that...

>From f491f62f16726d4b575db784781f50541e168b81 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <m...@openmailbox.org>
Date: Sat, 26 Sep 2015 18:47:37 +0200
Subject: [PATCH] lint: Fix 'check-texinfo-markup'.

Fixes a regression introduced in 5d8d8f3.

* guix/scripts/lint.scm (check-description-style): When no exception is
  thrown in 'check-texinfo-markup', return the rendered description.
---
 guix/scripts/lint.scm | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
index 0adb3bf..3b4ff72 100644
--- a/guix/scripts/lint.scm
+++ b/guix/scripts/lint.scm
@@ -146,11 +146,13 @@ 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."
-    (unless (false-if-exception (texi->plain-text description))
-      (emit-warning package
-                    (_ "Texinfo markup in description is invalid")
-                    'description)
-      #f))
+    (catch #t
+      (lambda () (texi->plain-text description))
+      (lambda (keys . args)
+        (emit-warning package
+                      (_ "Texinfo markup in description is invalid")
+                      'description)
+        #f)))
 
   (define (check-proper-start description)
     (unless (or (properly-starts-sentence? description)
-- 
2.5.3

--
Mathieu Lirzin

Reply via email to