guix-devel
[Top][All Lists]
Advanced

[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: Mon, 29 Dec 2014 15:23:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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.

> +  (let-values (((status argument)
> +                (probe-uri uri)))
> +    (case status
> +      ((http-response)

IMO ‘case’ is fine here.

> +(define (check-source package)
> +  ""

Missing docstring.

Thanks!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]