unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Dariqq <dariqq@posteo.net>
To: 74225@debbugs.gnu.org
Cc: Dariqq <dariqq@posteo.net>,
	"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#74225] [PATCH] lint: Check for more types of custom 'check phases.
Date: Wed,  6 Nov 2024 10:46:48 +0000	[thread overview]
Message-ID: <705438b285d013ee05c5ae1d73b1c80aff2aa4fa.1730890007.git.dariqq@posteo.net> (raw)

* guix/lint.scm (check-optional-tests): Also check for add-before and
add-after when adding custom 'check phases.

Change-Id: Idc959f90d7e9aa9d5001f34e00f88b41aa20fb2a
---
Hi,
Stumbled upon a test failure in u-boot-utils today which is not using #:tests? for its custom 'check phase but not being detected by the linter. Reason is that the 'check phase is added after 'install and not just replacing it.

This little patch makes it it possible to detect it and adds 38 more warnings.


 guix/lint.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guix/lint.scm b/guix/lint.scm
index 8c6c20c723..4ba728da33 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1433,6 +1433,10 @@ (define (check-optional-tests package)
     (match delta
       (`(replace 'check ,expression)
        (check-check-procedure expression))
+      (`(add-after ,_ 'check ,expression)
+       (check-check-procedure expression))
+      (`(add-before ,_ 'check ,expression)
+       (check-check-procedure expression))
       (_ '())))
   (define (check-phases-deltas deltas)
     (append-map check-phases-delta deltas))

base-commit: 0c1a6db8094dc6b20762eceae369daae545fc5e4
-- 
2.46.0





             reply	other threads:[~2024-11-06 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 10:46 Dariqq [this message]
2024-11-16  8:07 ` [bug#74225] [PATCH] lint: Check for more types of custom 'check phases Simon Tournier
2024-11-19 14:32   ` Dariqq

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=705438b285d013ee05c5ae1d73b1c80aff2aa4fa.1730890007.git.dariqq@posteo.net \
    --to=dariqq@posteo.net \
    --cc=74225@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).