From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aAaFKtvhrmLPxwAAbAwnHQ (envelope-from ) for ; Sun, 19 Jun 2022 10:44:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gHR4KdvhrmKh9QAAG6o9tA (envelope-from ) for ; Sun, 19 Jun 2022 10:44:11 +0200 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 34F10E0D0 for ; Sun, 19 Jun 2022 10:44:11 +0200 (CEST) Received: from localhost ([::1]:35540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2qXR-0004Yk-C6 for larch@yhetil.org; Sun, 19 Jun 2022 04:44:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2qXK-0004Yb-4a for guix-patches@gnu.org; Sun, 19 Jun 2022 04:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2qXJ-0002pt-RU for guix-patches@gnu.org; Sun, 19 Jun 2022 04:44:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2qXJ-00048I-Pj for guix-patches@gnu.org; Sun, 19 Jun 2022 04:44:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56083] [PATCH] style: Add option '--list-stylings'. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Jun 2022 08:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56083 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56083@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165562819915812 (code B ref -1); Sun, 19 Jun 2022 08:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2022 08:43:19 +0000 Received: from localhost ([127.0.0.1]:50611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2qWd-00046y-7T for submit@debbugs.gnu.org; Sun, 19 Jun 2022 04:43:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:43014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2qWb-00046r-K6 for submit@debbugs.gnu.org; Sun, 19 Jun 2022 04:43:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2qWb-0004VM-CJ for guix-patches@gnu.org; Sun, 19 Jun 2022 04:43:17 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:51129) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2qWW-0002lA-4w for guix-patches@gnu.org; Sun, 19 Jun 2022 04:43:17 -0400 Received: from hermia.goebel-consult.de ([87.176.142.69]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MsIbU-1niIiK22Fm-00toJ0 for ; Sun, 19 Jun 2022 10:37:50 +0200 Received: from lenashee.fritz.box (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id F209C5F535; Sun, 19 Jun 2022 10:37:50 +0200 (CEST) From: Hartmut Goebel Date: Sun, 19 Jun 2022 10:37:47 +0200 Message-Id: X-Mailer: git-send-email 2.30.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:FgxFWozCzHkepvGSb698CZ+alDewS7qGHAuH+WZiz/7AOwBNcls +zzujfIDUUoSujh+SCrcNZu/bmt0zEZ1tFtNMyCOImFWcs83lP1mT4n3XuwrgpRl+oPVcEU bhE5+m9IPwfk5wZ9cAwYeP8x4cKvZQ4EuaoFKaFlu5iZ/gvWoqejQFA6IxEEYGRpyns3P22 JspmGo9XxMkMVM9sFckhA== X-UI-Out-Filterresults: notjunk:1;V03:K0:yiNGtfghuDk=:jSQCCuZg4L97BpJdvfFQVd x9C8Z0+jKqCgqADENFzs0h+WWrqFUMnOQwMlO2d4tuSMl1o+6amkXZq7FGjTKB38pCeeKlFdv rRgB2Y3xLfuIkS+10I5028WayLAgxe0MD87H7T7/55rjC1BwPiFY+FyRZ0QS1gStqdKGcw8Wl QnZKWUOMyAjtLQcWtrbJCf9536EpwHXtzcsocv1NIcTZqm6wSb1UBdPMOtslTSgBW6NdX0kXt nxWPiIlKjV+A9TWQCPm5WWbLO0LfM9pQLCAqXcWxPLPBdSxJIr0TTQrV6goBivlcQCW1DVriW cia387m7FmRSS9VCKfwLKoz1KJ2bPE+lC5zWOk3PMNWTkwfcbSOSYkImc0bYcsxF2um3aLBYQ mKFtk9DJLpXGRkdFmBjKeHP4utgdXNVS9hURJUr0A9EQmDtx2Kme2SpHTEilKpkT8YPrNARCP ZKRSe36EwPhq5JOpLTJoswG/ezkVOzIU4Z9HEzSF8Axp8im9Ef1YOtARIUQJ1aB0x95gDxSTv +i5s162Cg2LwWd1wkJ/ZJA3FDoVDpb7Iz7SKTW1tftrzh8iRxyMq34CgLT8Clhi8DUr6DLScX BevXIPBNYZkt/ZWmQoBEHVcblX1mYd12Er5BauuRqc6M21GANYcsUiFPB6o0wi4NIq6OiTcy9 RNJvNpXGOUE9JDouW3icx3YBR7OMDm9PW6w/TCG05662hD+0QmoHrZwSe7Rpy2CbTIG8WSJSZ WlfANuuUN17pWQ242tE+VhVAMcEI9bb2WmhRgAUHu3Dk6o5ZpMxbbPXOuVU= Received-SPF: none client-ip=212.227.17.10; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655628251; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+vRDcM2rs2AtTiYbL16CxLQJ3mjtZQXTdLWOr9OGIVY=; b=XCjSB/+cEX5J9ALHrYJtKqpOWa5SoCE1GTuNIkPqpM0FxLXnpqY3xDMjM20h8uorQtJsQC 9EgnApmNTuivhGbkKkWWtMAigoKAUgl/6hjxoET1oUIjPXs86ojOKbtR/EJGilHs2oH6+M IiRJLZfHFZx0h1Lf2zP+bfsQfW9j/TgWPhFUh1Nm+1gKwnL23y0nAUIUH5IstDTy3fBTQG 3Kbmt3fp74eeGWU5ecU5ZS6TI8DVAebUlTuM15ChoRuJYjn2oVPZ0DUZUaOnBIuLdd900M tV4sCTM9Fxgy8/94JDLI95Dajha/iwUdrZuyu0Gu9bS2ffUG7w22TI/1CdFgFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655628251; a=rsa-sha256; cv=none; b=SXoie/kN1OhIW1wb1E4IdQE2s6y2ZKVzGKnYDXWIgbNwG5RvIxXSTA/mU6mkBpWYB7Luvs sFFkhKcloM+mNYsBEzmXwGlgd9oZuQ3W6FoJTtscWSZR4zNqblObWnG2zAOF174tOEz3QT C07Jld0KVWvc740gxxa9Q3drdec1YYqWZyNVW0E+21Gy8DOPgNHOxwHhE+H8xz1NhQHScg CBgmQoTEdt6av5WnxdbBFWpm/rOJ6EcvKrxKrZ5fYmUGR5YGyAeP+p2DeCh2oI3KVnUYw4 yyuLW3jGb8lqKkwRNNwgHFE8nVtnAbwFfR9N1hFXPkSjsv04Pdreld/dTrCJjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Spam-Score: -0.69 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Queue-Id: 34F10E0D0 X-Spam-Score: -0.69 X-Migadu-Scanner: scn0.migadu.com X-TUID: X+YSX0Co4bKd * guix/scripts/style.scm (show-stylings): New procedure. (%options, show-help): Add "--list-stylings". * doc/guix.texi (Invoking guix style): Document "-l". --- doc/guix.texi | 4 ++++ guix/scripts/style.scm | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 86348fc02c..2768762e62 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13963,6 +13963,10 @@ The @option{--input-simplification} option described below provides fine-grain control over when inputs should be simplified. @end table +@item --list-stylings +@itemx -l +List and describe the available styling rule and exit. + @item --load-path=@var{directory} @itemx -L @var{directory} Add @var{directory} to the front of the package module search path diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 8123570c38..3381a54130 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -797,15 +797,26 @@ PACKAGE." (lambda args (show-help) (exit 0))) + (option '(#\l "list-stylings") #f #f + (lambda args + (show-stylings) + (exit 0))) (option '(#\V "version") #f #f (lambda args (show-version-and-exit "guix style"))))) +(define (show-stylings) + (display (G_ "Available styling rules:\n")) + (display (G_ "- format: Format the given package definition(s)\n")) + (display (G_ "- inputs: Rewrite package inputs to the “new style”\n"))) + (define (show-help) (display (G_ "Usage: guix style [OPTION]... [PACKAGE]... Update package definitions to the latest style.\n")) (display (G_ " -S, --styling=RULE apply RULE, a styling rule")) + (display (G_ " + -l, --list-stylings display the list of available style rules")) (newline) (display (G_ " -n, --dry-run display files that would be edited but do nothing")) -- 2.30.4