unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 38460@debbugs.gnu.org
Subject: [bug#38460] [PATCH 1/1] lint: Add '--load-path' option.
Date: Wed, 4 Dec 2019 19:21:45 +0100	[thread overview]
Message-ID: <CAJ3okZ17wZvvuvo9kD5Bb4ONPNq8DC8chAZ-cMD0E_91hT-wxA@mail.gmail.com> (raw)
In-Reply-To: <87blsoc8yv.fsf@gnu.org>

Hi,

On Wed, 4 Dec 2019 at 18:10, Ludovic Courtès <ludo@gnu.org> wrote:

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

Done.


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

I did.
My bad.


Cheers,
simon

  parent reply	other threads:[~2019-12-04 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 20:47 [bug#38460] [PATCH 0/1] lint: Add '--load-path' option zimoun
2019-12-02 21:01 ` [bug#38460] [PATCH 1/1] " zimoun
2019-12-04 17:10   ` Ludovic Courtès
2019-12-04 18:06     ` [bug#38460] [PATCH v2] " zimoun
2019-12-04 18:21     ` zimoun [this message]
2019-12-07 22:51       ` [bug#38460] [PATCH 1/1] " Ludovic Courtès
2019-12-08 11:15         ` zimoun
2019-12-08 14:17           ` bug#38460: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ3okZ17wZvvuvo9kD5Bb4ONPNq8DC8chAZ-cMD0E_91hT-wxA@mail.gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=38460@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).