[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lint: add 'source' checker.
From: |
Cyril Roelandt |
Subject: |
Re: [PATCH] lint: add 'source' checker. |
Date: |
Sat, 03 Jan 2015 03:43:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 |
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. 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...
Cyril.
- Re: [PATCH] lint: add 'source' checker.,
Cyril Roelandt <=