[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38460] [PATCH 1/1] lint: Add '--load-path' option.

From: zimoun
Subject: [bug#38460] [PATCH 1/1] lint: Add '--load-path' option.
Date: Wed, 4 Dec 2019 19:21:45 +0100


On Wed, 4 Dec 2019 at 18:10, Ludovic Courtès <address@hidden> wrote:

> zimoun <address@hidden> skribis:
> > * guix/scripts/lint.scm (%options): Add '--load-path' option.
> > * tests/ Test it.
> Awesome, I’ve 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
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="$module_dir"
> > +
> > +out=`guix lint -L $LOAD_PATH -c synopsis,description dummy 2>&1`
> Perhaps you don’t even need to define ‘LOAD_PATH’?


> Could you add ‘-L’ to guix.texi, and then I guess we’re done!

I did.
My bad.


reply via email to

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