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

From: Herman Rimm <[email-masked]>
Date: Sun, 5 May 2024 19:25:32 +0200

Hi,

I do not think 'find-unordered-packages' would be useful for e.g. guix
style, so I made a similar procedure in (guix scripts lint) instead.  It
is implemented with 'fold-packages' to get package records to pass to
the 'run-checkers' procedure.  So now you can use guix lint with
--whole-file to also lint the package ordering, for example:

  $ guix lint -f gnu/packages/matrix.scm -n
  gnu/packages/matrix.scm:161:0: [email-masked]: breaks from alphabetical order
  gnu/packages/matrix.scm:244:0: [email-masked]: breaks from alphabetical order

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?

Cheers,
Herman

Herman Rimm (3):
  guix: Move ‘package-location<?’ to (guix packages).
  ui: Make 'user-module' parameter of 'load*' optional.
  scripts: lint: Add 'whole-file' option with ordering lint.

 doc/guix.texi          | 23 ++++++++++++++++--
 guix/packages.scm      | 11 +++++++++
 guix/scripts/lint.scm  | 55 +++++++++++++++++++++++++++++++++++++-----
 guix/scripts/style.scm |  9 -------
 guix/ui.scm            |  3 ++-
 5 files changed, 83 insertions(+), 18 deletions(-)

base-commit: ef8ab6ab66c4d629699d175938ef1912941d4dce
-- 
2.41.0