From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id yJzoB8dmkWaSHAEAe85BDQ:P1 (envelope-from ) for ; Fri, 12 Jul 2024 17:24:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id yJzoB8dmkWaSHAEAe85BDQ (envelope-from ) for ; Fri, 12 Jul 2024 19:24:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dUHmeBbt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720805062; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IRKpmqdKI7616wEYEI3Qxp7EpVoHvOeBOzJN1w6MK6Q=; b=D2sdnMYb5xKUzHhbpMWk9vLxETsFi9f/NAccdlWQ/6ehdxwBmO8RMHpOGDBz8WCk6t7uN0 wHKTG94M5jadqnSeke34En5o8kCV4Oy10ORuFMFgkZJWSwOyeGLoXed8Xii6BIc/Zj6I2j Eir8kW/nq7Oor+h7WOKFP3YbSG5EHZJ6YwhTWwxvgdexk6q/ldt/uGhrP3ZeFuQkPvjSaZ q+vYlL/6GGIIZTofsTNAyUxkUUOsyy/xaCbQXZvRSAYZtU4TRtgw/xfYKvk9b9CJ8FG0Vv qrNhiiAzs+5bLXmj3Nk5waXt5EGEb21xK+T8Pu5fuzY+iqiS0RxwikLsglkHUw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720805062; a=rsa-sha256; cv=none; b=FLG6DjDEfk0C+TEhTzaIkXw6wSN5naC3plKnjd/XrLvonsZqcr7DaVtvm+v/wPxRFEHIMB RNtxNW7XQzi6inwl06744Brv3SZYtycf1yWB080MNi2wHDtp89ON4Zdyz3hvXBZcvk/wkz 6pmTijIOhNtwRw+mqXs7G6pgs8vsW1s4Z5aIsJFXzOmalUk0kztXcMwPvuW7Tw/v9euXco 0qd1/kSj9Ok8GuvZtu2yagtkbVMcQ08ZHvaQ/mXQCic0efhrkZ16Zz43Jm8lBsX8Ryswx1 7J3etpF0k9d2qtMfeXbJp7ki1DJJT/CVt9vH7qKRFVHKnBa5xGE9+kNHDZkXEw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=dUHmeBbt; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C485F3A71F for ; Fri, 12 Jul 2024 19:24:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSK0F-0007RS-Nb; Fri, 12 Jul 2024 13:24:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSK0A-0007QM-O1 for guix-patches@gnu.org; Fri, 12 Jul 2024 13:24:14 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSK08-0004Tb-PA; Fri, 12 Jul 2024 13:24:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSK02-0007Yd-AR; Fri, 12 Jul 2024 13:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71697] [PATCH v4 1/2] scripts: lint: Add 'dry-run' option. References: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com> In-Reply-To: <8cb162bcde91d3b39453de576caadb9a6f8f8733.1718990517.git.zimon.toutoune@gmail.com> Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, pelzflorian@pelzflorian.de, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, matt@excalamus.com, maxim.cournoyer@gmail.com, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 12 Jul 2024 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71697 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71697@debbugs.gnu.org Cc: Simon Tournier , Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Florian Pelz , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Matthew Trzcinski , Maxim Cournoyer , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 71697-submit@debbugs.gnu.org id=B71697.172080501328969 (code B ref 71697); Fri, 12 Jul 2024 17:24:02 +0000 Received: (at 71697) by debbugs.gnu.org; 12 Jul 2024 17:23:33 +0000 Received: from localhost ([127.0.0.1]:54711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSJzZ-0007XA-5A for submit@debbugs.gnu.org; Fri, 12 Jul 2024 13:23:33 -0400 Received: from mail-lf1-f41.google.com ([209.85.167.41]:41193) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSJzW-0007Wi-Qp for 71697@debbugs.gnu.org; Fri, 12 Jul 2024 13:23:32 -0400 Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-52e98c72d2bso304875e87.0 for <71697@debbugs.gnu.org>; Fri, 12 Jul 2024 10:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720804943; x=1721409743; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IRKpmqdKI7616wEYEI3Qxp7EpVoHvOeBOzJN1w6MK6Q=; b=dUHmeBbtKt5INp1DS5meXIINQKH+lG10uUDM0vRKkyMNhHI6uPT61ESr/KUaMNoDdP c1Qnf7ipKSCzjWc0Pyn7CgVgflDzmQOJuskdN+rEpPvh+eNp9oFvHQYkI+eooub7F+lF 1U8fEEWvfv1/jOlAJBLz4NLXrudWDPSzvSwUQTwhi+gUYlVKT1MWzKWqdCwzZAX+kMRx ANwKTtCEDYLTbbaFQaov9vZttMxWXsKLnuQ0kUsI5ICguEuuAPXNDk7WYNH6JsjTKSs/ B2MiRVTjFgzwRABT0wNONLytQcLADtOhNyNFnel//mle36nUJGaKfnB5nkMtlClS/qxC rR7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720804943; x=1721409743; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IRKpmqdKI7616wEYEI3Qxp7EpVoHvOeBOzJN1w6MK6Q=; b=SubduXv2fPd9o50jksA9143GQvjaUVqY3mLDG0IoJFYQrVUu9fHhnIvobx+33GsgHa inaWLplRFEyqbnKLNbHcUK3u7ZmNHea1F6bZ2M5/YqcQBbojZgfi0dJKCnNp9ypQWv6G bTA9E772WsujTofmaMyID7jqDVJPk6Q1cIBk6zJXZSOs43R1eqgs+4RahX7UTsN4Vixx y6yE+KJi4Xu7y41Or3vsBztoAB2fFH8xd+JPA0HCl4W0q2b+g3DLj5NJRRrvrJdXDBjw 2HjxlVRp1eRJD5qerHD7JUvWhs30/NwJVOVAst3V7YETq16yexuZ6UQq7nGUHq9KsYFt 12QQ== X-Gm-Message-State: AOJu0YxGrgjbgt1s8hGy8wxiJnCh7OFClcLM8Ju53zMcOREyd+Lc9Pxe Rprz1rCrwwiOOn5b/98QKE2zgWyfQVgdr5JdkAZaFC51Cdad8MZEP6hXfw== X-Google-Smtp-Source: AGHT+IFeTejb0yxhLnJcRvHepqFFSh79ArS+nu1kSfyfCoG/JiYjaTMxP4MjKPRlGN54jVxKcogJQQ== X-Received: by 2002:a05:6512:1597:b0:52e:be49:9d35 with SMTP id 2adb3069b0e04-52ebe499f1fmr5549603e87.4.1720804942479; Fri, 12 Jul 2024 10:22:22 -0700 (PDT) Received: from lili.univ-paris-diderot.fr (roam-nat-fw-prg-194-254-61-41.net.univ-paris-diderot.fr. [194.254.61.41]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f288c3fsm28943435e9.29.2024.07.12.10.22.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jul 2024 10:22:21 -0700 (PDT) From: Simon Tournier Date: Fri, 12 Jul 2024 19:22:12 +0200 Message-ID: <9971c126670cd0f49a647d538aaf206d5b963322.1720804839.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -0.30 X-Spam-Score: -0.30 X-Migadu-Queue-Id: C485F3A71F X-Migadu-Scanner: mx11.migadu.com X-TUID: MfxSPrXinftp * guix/scripts/lint.scm (guix-lint)[show-package-checkers]: New procedure. (show-help, %options): Add 'dry-run' option. * doc/guix.texi: Document it. Change-Id: I8c96e376d52c0961ccf2ab39f1fc856c762b089d --- doc/guix.texi | 3 +++ guix/scripts/lint.scm | 26 ++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5b77c84b4a..6043962038 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15463,6 +15463,9 @@ Invoking guix lint List and describe all the available checkers that will be run on packages and exit. +@item --dry-run +Do not run the checkers. + @item --checkers @itemx -c Only enable the checkers specified in a comma-separated list using the diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index ee3de51fb1..1b13d6e17f 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -100,6 +100,8 @@ (define (show-help) (display (G_ "Usage: guix lint [OPTION]... [PACKAGE]... Run a set of checkers on the specified package; if none is specified, run the checkers on all packages.\n")) + (display (G_ " + --dry-run do not run checkers ")) (display (G_ " -c, --checkers=CHECKER1,CHECKER2... only run the specified checkers")) @@ -154,6 +156,9 @@ (define %options (option '(#\n "no-network") #f #f (lambda (opt name arg result) (alist-cons 'no-network? #t result))) + (option '("dry-run") #f #f + (lambda (opt name arg result) + (alist-cons 'dry-run? #t result))) (find (lambda (option) (member "load-path" (option-names option))) %standard-build-options) @@ -218,14 +223,27 @@ (define-command (guix-lint . args) (proc store)) (proc #f))) + (define (show-package-checkers package checkers) + (format (current-error-port) "~a@~a checked by~{ ~a~}.~%" + (package-name package) + (package-version package) + (sort (map (compose symbol->string lint-checker-name) + checkers) + string