all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: 33575@debbugs.gnu.org
Subject: [bug#33575] [PATCH] guix: lint: Add checker to check if inputs are sorted.
Date: Mon, 03 Dec 2018 14:31:44 +0100	[thread overview]
Message-ID: <87y3967n3z.fsf@gnu.org> (raw)
In-Reply-To: <20181202074210.31361-1-arunisaac@systemreboot.net> (Arun Isaac's message of "Sun, 2 Dec 2018 13:12:10 +0530")

Hello,

Arun Isaac <arunisaac@systemreboot.net> skribis:

> * guix/scripts/lint.scm (check-inputs-should-be-sorted): New procedure.
> (%checkers): Add it.
> ---
>  guix/scripts/lint.scm | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm
> index 2314f3b28..37e8a1ec5 100644
> --- a/guix/scripts/lint.scm
> +++ b/guix/scripts/lint.scm
> @@ -8,6 +8,7 @@
>  ;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
>  ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
>  ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
> +;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -301,6 +302,22 @@ of a package, and INPUT-NAMES, a list of package specifications such as
>                (package-input-intersection (package-direct-inputs package)
>                                            input-names))))
>  
> +(define (check-inputs-should-be-sorted package)
> +  ;; Emit a warning if inputs, native inputs or propagated inputs of PACKAGE
> +  ;; are not lexicographically ordered.

It’s something we rarely do so we’d get warnings for most packages.  As
a side effect, people may pay less attention to what ‘guix lint’ says.

As for the goal itself, I think sorting is a good idea when there are
lots of inputs (things like IceCat), but otherwise I personally don’t
think it matters that much.

What do people think?

Thanks,
Ludo’.

  reply	other threads:[~2018-12-03 13:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-02  7:42 [bug#33575] [PATCH] guix: lint: Add checker to check if inputs are sorted Arun Isaac
2018-12-03 13:31 ` Ludovic Courtès [this message]
2018-12-04  9:13   ` Tobias Geerinckx-Rice
2018-12-08 13:29     ` Ludovic Courtès
2018-12-06  0:42   ` Oleg Pykhalov
2018-12-06 12:31     ` swedebugia
2018-12-07 13:08       ` Maxim Cournoyer
2018-12-08  3:51 ` 宋文武
2018-12-08  7:58   ` swedebugia
2018-12-08 13:34   ` Arun Isaac
2018-12-09 22:49     ` Maxim Cournoyer
2018-12-10 11:45       ` 宋文武
2018-12-10 11:19     ` 宋文武
2018-12-18 20:36       ` bug#33575: " Arun Isaac

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

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

  git send-email \
    --in-reply-to=87y3967n3z.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=33575@debbugs.gnu.org \
    --cc=arunisaac@systemreboot.net \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.