From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44383) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icZIq-0006w6-Bo for guix-patches@gnu.org; Wed, 04 Dec 2019 13:23:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icZIm-0001DB-Cf for guix-patches@gnu.org; Wed, 04 Dec 2019 13:23:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icZIl-0001CZ-94 for guix-patches@gnu.org; Wed, 04 Dec 2019 13:23:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1icZIk-0007mi-4R for guix-patches@gnu.org; Wed, 04 Dec 2019 13:23:02 -0500 Subject: [bug#38460] [PATCH 1/1] lint: Add '--load-path' option. Resent-Message-ID: MIME-Version: 1.0 References: <20191202204759.28329-1-zimon.toutoune@gmail.com> <20191202210127.28466-1-zimon.toutoune@gmail.com> <87blsoc8yv.fsf@gnu.org> In-Reply-To: <87blsoc8yv.fsf@gnu.org> From: zimoun Date: Wed, 4 Dec 2019 19:21:45 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38460@debbugs.gnu.org Hi, On Wed, 4 Dec 2019 at 18:10, Ludovic Court=C3=A8s wrote: > zimoun skribis: > > > * guix/scripts/lint.scm (%options): Add '--load-path' option. > > * tests/guix-lint.sh: Test it. > > Awesome, I=E2=80=99ve been wanting that for a long time. :-) But I find this "hacky". Because it is copy/paste from other --load-path option elsewhere (probably "guix show" :-)). It should be refactored to have only one function and call it where the command needs it. I mean, the same way that 'show-build-options-help' or '(append %transformation-options %standard-build-options)' does in "guix package". Other said, %standard-build-options should be splited and go to say misc.scm or common.scm or whatever -- I do not know enough the file organization. :-) Now, the same --load-path code at 3 different places. Bad practise... IMHO. Plus, we will win more flexibility to write more commands. ;-) What do you think? > > +LOAD_PATH=3D"$module_dir" > > + > > +out=3D`guix lint -L $LOAD_PATH -c synopsis,description dummy 2>&1` > > Perhaps you don=E2=80=99t even need to define =E2=80=98LOAD_PATH=E2=80=99= ? Done. > Could you add =E2=80=98-L=E2=80=99 to guix.texi, and then I guess we=E2= =80=99re done! I did. My bad. Cheers, simon