Subject: Re: [bug#70499] [PATCH v2 0/3] Lint package order.

From: Herman Rimm <[email-masked]>
Date: Thu, 4 Jul 2024 22:26:37 +0200

Hello,

On Sat, May 25, 2024 at 04:06:45PM +0200, Ludovic Courtès wrote:
> > However the alphabetical order lint warnings only appear once another
> > type of lint warning is emitted, or when end of file is reached and
> > linting finishes. So if few checkers are enabled, it takes a few seconds
> > before anything is output for large module files, like 'crates-io.scm'.
> > Can this be fixed easily?
> 
> I’m not sure I understand.  The alpabetical checker is part of another
> patch set, right?  (I know I’ve seen it, but I’m afraid I’ve lost track
> of it. :-))
> 
> Anyway, we can and should discuss ‘--whole-file’ independently of the
> alphabetical-order checker.

I added the '--alphabetical-sort' option to guix style in [bug#70800].
For guix lint, the alphabetical checker is added in [PATCH 3/3].  It
runs only when '--whole-file' is specified.  It cannot be toggled with
-c or -x because it is not a normal checker, because run-checkers only
runs on a single package at a time.  It could be a normal checker if
given a package, the preceding package can be retrieved.  It could be
stored as a parameter.  How would you get the preceding package?

> >   guix: Move ‘package-location<?’ to (guix packages).
> >   ui: Make 'user-module' parameter of 'load*' optional.
> >   scripts: lint: Add 'whole-file' option with ordering lint.
> 
> This LGTM modulo minor issues:
> 
>   • The second patch looks unrelated to ‘--whole-file’, I’d drop it from
>     this series.

I use load* on the specified file(s).  I could instead add a --modules=
MODULE1,MODULE2... option to be used with -L when necessary.

Cheers,
Herman