[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] lint: Check non-translated package descriptions.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 1/2] lint: Check non-translated package descriptions. |
Date: |
Sat, 26 Sep 2015 15:05:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mathieu Lirzin <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
>
>> Mathieu Lirzin <address@hidden> skribis:
>>
>>> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
>>> index b0427f7..0adb3bf 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))
>>
>> In general, it’s best to avoid ‘false-if-exception’ because it’s too
>> coarse-grain. Here it’s probably OK though, because we want to catch
>> any error that may occur in during the conversion. So this patch is OK
>> (with appropriate commit log.)
>
> Ok, thanks for the explanation.
>
>
> From 429ff285609120c4135eb64f1d6911924a24f5e6 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <address@hidden>
> 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.
OK!
Thanks,
Ludo’.
- [PATCH 0/2] lint: Texinfo again., Mathieu Lirzin, 2015/09/22
- [PATCH 1/2] lint: Check non-translated package descriptions., Mathieu Lirzin, 2015/09/22
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Ludovic Courtès, 2015/09/22
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Mathieu Lirzin, 2015/09/24
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Ludovic Courtès, 2015/09/25
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Mathieu Lirzin, 2015/09/25
- Re: [PATCH 1/2] lint: Check non-translated package descriptions.,
Ludovic Courtès <=
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Mathieu Lirzin, 2015/09/26
- Re: [PATCH 1/2] lint: Check non-translated package descriptions., Ludovic Courtès, 2015/09/27
[PATCH 2/2] lint: Accept '`' character., Mathieu Lirzin, 2015/09/22