[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lint: add 'source' checker.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] lint: add 'source' checker. |
Date: |
Sat, 03 Jan 2015 20:11:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Cyril Roelandt <address@hidden> skribis:
> On 12/29/2014 03:23 PM, Ludovic Courtès wrote:
>> Cyril Roelandt <address@hidden> skribis:
>>
>>> * guix/scripts/lint.scm (uri-available?): New procedure.
>>> (%checkers): Add 'home-page' checker
>>
>> Some comments in addition to what David already wrote.
>>
>>> +(define (uri-available? uri)
>>> + "Return #t if the given URI can be reached, otherwise throw a
>>> +'not-available exception along with an appropriate error message."
>>
>> By convention, one would expect ‘uri-available?’ to return #t or #f, not
>> to throw.
>>
>> How about calling it ‘validate-uri’ and directly call ‘emit-warning’
>> from there? It would need the field name as an additional argument.
>>
>
> This would also require passing the "package" to validate-uri.
Right, and I think it’s fine.
> How about we make uri-available? return #t/#f, and just don't really
> care about the exact reason why it failed ? Anyway a human being is
> going to manually check what happened to know whether this is a real
> issue or just a server that went down for a couple hours, or a file
> that wrongly got removed...
Possibly but still, I prefer to have detailed reports since we already
have all the details anyway.
Thanks,
Ludo’.