unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Simon Tournier" <zimon.toutoune@gmail.com>
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	"Florian Pelz" <pelzflorian@pelzflorian.de>,
	71697@debbugs.gnu.org, "Christopher Baines" <guix@cbaines.net>,
	"Matthew Trzcinski" <matt@excalamus.com>,
	"Christopher Baines" <guix@cbaines.net>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>,
	"Simon Tournier" <zimon.toutoune@gmail.com>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#71697] [PATCH v5 0/3] Add dry-run to guix lint
Date: Fri, 19 Jul 2024 20:27:04 +0200	[thread overview]
Message-ID: <cover.1721411923.git.zimon.toutoune@gmail.com> (raw)
In-Reply-To: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com>

Hi,

Examples are probably better than many words. :-)

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint --dry-run
guix lint: error: too much information to display, did nothing and exit

$ ./pre-inst-env guix lint --dry-run hello
gnu/packages/base.scm:94:2: hello@2.12.1: all the 27 checkers would run.

$ ./pre-inst-env guix lint --dry-run hello -c derivation
gnu/packages/base.scm:94:2: hello@2.12.1: 1/27 checkers would run: derivation.

$ ./pre-inst-env guix lint --dry-run hello -n
gnu/packages/base.scm:94:2: hello@2.12.1: 18/27 checkers would run at the exclusion of: archival cve github-url gnu-description haskell-stackage home-page refresh source synopsis.

$ ./pre-inst-env guix lint --dry-run hello -c derivation -x derivation
gnu/packages/base.scm:94:2: hello@2.12.1: none of 27 checkers would run

$ # Using modified package with the new package properties
$ ./pre-inst-env guix lint --dry-run hello python-scikit-learn -x cve 
gnu/packages/base.scm:94:2: hello@2.12.1: 26/27 checkers would run at the exclusion of: cve.
gnu/packages/machine-learning.scm:1723:2: python-scikit-learn@1.4.2: 23/27 checkers would run at the exclusion of: archival cve name synopsis.
--8<---------------cut here---------------end--------------->8---

I think it addresses all the comments.  The idea is to display the most
relevant information, i.e., the message displays the shortest list of checkers
between the excluded ones and the others, because, IMHO, it eases to get what
would run.

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint --dry-run hello -c name,tests-true,compiler-for-target,description,inputs-should-be-native,inputs-should-not-be-input,input-labels,wrapper-inputs,license,optional-tests,mirror-url,source-file-name,source-unstable-tarball,profile-collisions,patch-file-names,patch-headers,formatting,synopsis,gnu-description,home-page,source,github-url,cve,refresh,archival,haskell-stackage
gnu/packages/base.scm:94:2: hello@2.12.1: 26/27 checkers would run at the exclusion of: derivation.
--8<---------------cut here---------------end--------------->8---


Well, since I did some typo when testing, the last patch of the series is
included for the same price. ;-)

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix lint -c dervation
guix lint: error: dervation: invalid checker
hint: Did you mean `derivation'?
--8<---------------cut here---------------end--------------->8---


WDYT?

Cheers,
simon

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 34dc5c8d26..cbebc6494e 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1775,6 +1775,7 @@ (define-public python-scikit-learn
            python-pytest-xdist))
     (propagated-inputs
      (list python-numpy python-threadpoolctl python-scipy python-joblib))
+    (properties '((lint-excluded-checkers . (archival name synopsis))))
     (home-page "https://scikit-learn.org/")
     (synopsis "Machine Learning in Python")
     (description
--8<---------------cut here---------------end--------------->8---


Simon Tournier (3):
  scripts: lint: Add 'dry-run' option.
  scripts: lint: Honor package property to exclude checkers.
  scripts: lint: Add hint for checker typo.

 doc/guix.texi         | 19 +++++++++-
 guix/scripts/lint.scm | 81 +++++++++++++++++++++++++++++++++++++++----
 2 files changed, 92 insertions(+), 8 deletions(-)


base-commit: 9724e61cda80e4c59a2eb419a453887ecc551b9a
-- 
2.41.0





  parent reply	other threads:[~2024-07-19 18:29 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 17:22 [bug#71697] [PATCH] guix: lint: Honor 'no-archival?' package property Simon Tournier
2024-06-21 18:33 ` [bug#71697] [PATCH v2] guix: scripts: lint: Honor package property to exclude chercker Simon Tournier
2024-06-21 21:09   ` Liliana Marie Prikler
2024-06-22 14:29   ` MSavoritias
2024-06-22 15:40     ` Simon Tournier
2024-06-24  8:21       ` MSavoritias
2024-06-22 15:27 ` [bug#71697] [PATCH v3 1/2] scripts: lint: Add 'dry-run' option Simon Tournier
2024-06-22 15:27   ` [bug#71697] [PATCH v3 2/2] scripts: lint: Honor package property to exclude checkers Simon Tournier
2024-06-23 23:51     ` Maxim Cournoyer
2024-06-25 15:14     ` Ludovic Courtès
2024-06-25 17:14       ` Greg Hogan via Guix-patches
2024-06-26  8:24         ` Ricardo Wurmus
2024-06-26 19:28         ` Maxim Cournoyer
2024-06-27 16:38           ` Greg Hogan
2024-06-29  3:12             ` Maxim Cournoyer
2024-06-30 14:48               ` Dale Mellor
2024-07-01 20:44                 ` Maxim Cournoyer
     [not found]                   ` <72a5f3c9d0523b29ed99afd5a551b411f4c0e7f5.camel@rdmp.org>
2024-07-02  1:39                     ` Maxim Cournoyer
2024-07-12 13:36                 ` Simon Tournier
2024-07-05  7:40             ` Ludovic Courtès
2024-07-12 14:16             ` Simon Tournier
2024-07-25 15:19               ` Greg Hogan
2024-07-12 17:20           ` Simon Tournier
2024-06-23 23:54   ` [bug#71697] [PATCH v3 1/2] scripts: lint: Add 'dry-run' option Maxim Cournoyer
2024-07-12 17:22 ` [bug#71697] [PATCH v4 " Simon Tournier
2024-07-12 17:22   ` [bug#71697] [PATCH v4 2/2] scripts: lint: Honor package property to exclude checkers Simon Tournier
2024-07-18  9:19   ` [bug#71697] [PATCH v4 1/2] scripts: lint: Add 'dry-run' option Ludovic Courtès
2024-07-18 11:00     ` Simon Tournier
2024-07-19 18:27 ` Simon Tournier [this message]
2024-07-19 18:38   ` [bug#71697] [PATCH v5 1/3] " Simon Tournier
2024-07-26  2:06     ` Maxim Cournoyer
2024-07-19 18:38   ` [bug#71697] [PATCH v5 2/3] scripts: lint: Honor package property to exclude checkers Simon Tournier
2024-07-19 18:38   ` [bug#71697] [PATCH v5 3/3] scripts: lint: Add hint for checker typo Simon Tournier
2024-07-26  2:26     ` Maxim Cournoyer

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=cover.1721411923.git.zimon.toutoune@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=71697@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=matt@excalamus.com \
    --cc=maxim.cournoyer@gmail.com \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=pelzflorian@pelzflorian.de \
    /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).