From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oFUcKtntdmYi6AAAqHPOHw:P1 (envelope-from ) for ; Sat, 22 Jun 2024 15:29:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id oFUcKtntdmYi6AAAqHPOHw (envelope-from ) for ; Sat, 22 Jun 2024 17:29:29 +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=BDCUbEuc; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1719070169; 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=iTeAICyrNsT46JmUSzzy/T6nLJzSjmnRRhRRrPI9P+s=; b=QD3aX4kh16unJ7rKlKB1q71VStE8PepFqxV4lG++qxgGwe8F3F+wqgwTNv4NPuacuIjHV+ b/qepxN64xmQgGx8shMQOoOb7+avbcYABBQUEZu6Sjye2pcwcr19Jx9an3exoYeDtIS4z9 KDDH+lapoGiOlMkokAYptOD0dZLm56NNGOq8Ey4/IKbph7GWXF0ULD2bNuVRRxjIGnhIe0 lSknSpNTSeMehcF9XVD7KO4XwRlcwz++zPpfPVP+/g0kYwl06E0GwQQ8cRskT42oUauXNd On3cAT5BToGGNptaJU7ZZQZJWDxK6LyNnyNMqudHpFdEpxh6eE+jub+aF9ZXig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=BDCUbEuc; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1719070169; a=rsa-sha256; cv=none; b=sfEZCvrRDNQDVa7TjJXj0fEphN6qxXslG730fs0cvoBSscv2NEzKmnjf/Yy+vF6jEeETY2 9rFEjEk+ExtqZ2ORbLXKnvhs6REZbuHOR1vYI3OkCbz87kOZTcG4m98wVwxOYrWDRJVAoB 9ag6/L2luS/ibMHGD6l3EWGP0UagrsGlfKLE4g3ZyrpbT26SynFKt2dU7/AJrwgcPUWWka P8WWpPr26XhwBxQ76ffuF59XC7J4xkTUnop9KbKCigzVlpwjppg08SBrXmL2tLLnNfqSEh 39tzVOIXyFAzAA2Hf4rzXtD4C/yD5Nm/wdYVagqW1TUzRomnro9yFvAPG9DgtQ== 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 83B1268EA0 for ; Sat, 22 Jun 2024 17:29:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sL2fv-0004qw-Jj; Sat, 22 Jun 2024 11:29:11 -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 1sL2ft-0004qd-9b for guix-patches@gnu.org; Sat, 22 Jun 2024 11:29:09 -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 1sL2ft-0002Yh-1p; Sat, 22 Jun 2024 11:29:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sL2fl-0000wb-Mg; Sat, 22 Jun 2024 11:29:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71697] [PATCH v3 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, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sat, 22 Jun 2024 15:29:01 +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 , Ricardo Wurmus , 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 , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 71697-submit@debbugs.gnu.org id=B71697.17190701013531 (code B ref 71697); Sat, 22 Jun 2024 15:29:01 +0000 Received: (at 71697) by debbugs.gnu.org; 22 Jun 2024 15:28:21 +0000 Received: from localhost ([127.0.0.1]:49743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL2f6-0000ut-Ms for submit@debbugs.gnu.org; Sat, 22 Jun 2024 11:28:21 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:39218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sL2f5-0000uW-1f for 71697@debbugs.gnu.org; Sat, 22 Jun 2024 11:28:19 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42181803bf2so4437935e9.1 for <71697@debbugs.gnu.org>; Sat, 22 Jun 2024 08:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719070033; x=1719674833; 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=iTeAICyrNsT46JmUSzzy/T6nLJzSjmnRRhRRrPI9P+s=; b=BDCUbEucdUYeN1/ZkizA3JP0J63XFooiksXGjd37FxCZlEsL39JqdKk0CrHVvTqtpe cxteRHaaKBHJy7jvuPO2cc72da6UEM6jlqsOWia3nItf+y2IrJDl8SeUTOaCwfiR6epz b0SGVjTC8UIrQBXi9fzUrLkWhF2DgyDBE07f0ltjGWKAzbE0QLvZtpJkjz+Tony4heSa jBEitKcaYD+jqyE8VqE/MT2MtCFlveHkB/9pKlGCP/OHtp428Ujn/9tzT7M6l5tfhECe 1ev6J6tuTcz18J9YUvmoUqBsJ2q5MzCHorcI1tJiX90sCPCgVrUbzXMUJiHz97uSGgkX LEJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719070033; x=1719674833; 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=iTeAICyrNsT46JmUSzzy/T6nLJzSjmnRRhRRrPI9P+s=; b=dhPItfyVgeUHZ2nq2/Rb8ASfEmJeJbF8/9XjCJa7DrsUwr3LAvhYIQNF0pyO7ozphy KN4K5vylSPaQl+r3nSmVvz/O1V1184DyIbGtRJDqAfxUfCeEWcMiLFBxIMq2Itb07X3r xHIlFVLsvHxZYTM+F9oaYXTG6z6114OTzqd/20uexw6qUZnCk21Yz1vK88kTCjmILbI0 FBPLSOPmHRX1Al0Ewhc3KPIYRjn6tZEoAdJW/n3xvyNUIgICZCTmxu4NxdqAJXHnxCVU dqLmGnJM8rsqN8wNB5M1Cs+adEklpT9XoL32MoMzjRkWc47CXmlm1IE6lHuGfGzYmqxi J4NA== X-Gm-Message-State: AOJu0YzH1Tz0mgPqKuhrHcNzqiiwij/JifQ4/0dkKel8znq6XJxZQl67 bi0SORUPVSe8olMUlePPRnnVs4ZPilc5i6aE0oYQ4+is68IEl6w4F9oX4Q== X-Google-Smtp-Source: AGHT+IGzItJaN+OqeWcvkDiwGWXHLlZunV7eYia2T6qrlDN+/j4IYRfvZIIxkUsF4NGZZuHtkfDJ+Q== X-Received: by 2002:a05:6000:18ae:b0:35f:2929:846e with SMTP id ffacd0b85a97d-366e2a0a8eemr1015226f8f.1.1719070033018; Sat, 22 Jun 2024 08:27:13 -0700 (PDT) Received: from lili.. ([2a01:e0a:59b:9120:cf36:ad5d:499d:a92]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366383f6dc7sm4763294f8f.14.2024.06.22.08.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Jun 2024 08:27:12 -0700 (PDT) From: Simon Tournier Date: Sat, 22 Jun 2024 17:27:07 +0200 Message-ID: <1f9e0a732fff5c6460e6da9500ea5b748882e38d.1719069966.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 4.64 X-Migadu-Queue-Id: 83B1268EA0 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: 4.64 X-TUID: /VPRVpg6pDdG * guix/scripts/lint.scm (show-help, %options): Add 'dry-run' option. (guix-lint): Use it. * doc/guix.texi: Document it. Change-Id: I8c96e376d52c0961ccf2ab39f1fc856c762b089d --- doc/guix.texi | 3 +++ guix/scripts/lint.scm | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 769ca1399f..037b1a2f24 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15459,6 +15459,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..b98266c831 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) @@ -222,10 +227,13 @@ (define-command (guix-lint . args) (lambda (store) (cond ((null? args) - (fold-packages (lambda (p r) (run-checkers p checkers - #:store store)) '())) + (fold-packages (lambda (p r) + (when (not (assoc-ref opts 'dry-run?)) + (run-checkers p checkers + #:store store))) '())) (else (for-each (lambda (package) - (run-checkers package checkers - #:store store)) + (when (not (assoc-ref opts 'dry-run?)) + (run-checkers package checkers + #:store store))) args))))))))) base-commit: bc8a41f4a8d9f1f0525d7bc97c67ed3c8aea3111 -- 2.41.0