From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] lint: add 'source' checker. Date: Mon, 29 Dec 2014 15:23:25 +0100 Message-ID: <871tni357m.fsf@gnu.org> References: <54A0C5A8.2030105@gmail.com> <1419824407-6471-1-git-send-email-tipecaml@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5bEI-0004qU-2w for guix-devel@gnu.org; Mon, 29 Dec 2014 09:23:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y5bEE-00037t-Tw for guix-devel@gnu.org; Mon, 29 Dec 2014 09:23:30 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:33056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y5bEE-00037k-Mm for guix-devel@gnu.org; Mon, 29 Dec 2014 09:23:26 -0500 In-Reply-To: <1419824407-6471-1-git-send-email-tipecaml@gmail.com> (Cyril Roelandt's message of "Mon, 29 Dec 2014 04:40:07 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Cyril Roelandt Cc: guix-devel@gnu.org Cyril Roelandt 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 =E2=80=98uri-available?=E2=80=99 to return = #t or #f, not to throw. How about calling it =E2=80=98validate-uri=E2=80=99 and directly call =E2= =80=98emit-warning=E2=80=99 from there? It would need the field name as an additional argument. > + (let-values (((status argument) > + (probe-uri uri))) > + (case status > + ((http-response) IMO =E2=80=98case=E2=80=99 is fine here. > +(define (check-source package) > + "" Missing docstring. Thanks! Ludo=E2=80=99.