From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 0/8] Linter improvements (eliminate false positives)=?UTF-8?Q?=1B?= Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17321928551330 (code B ref -1); Thu, 21 Nov 2024 12:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 Nov 2024 12:40:55 +0000 Received: from localhost ([127.0.0.1]:49417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6UR-0000LD-9X for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:40:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:33970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6UO-0000L3-PE for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:40:53 -0500 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 1tE6UO-0003dr-IA for guix-patches@gnu.org; Thu, 21 Nov 2024 07:40:52 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tE6UJ-0005Xj-Q3 for guix-patches@gnu.org; Thu, 21 Nov 2024 07:40:52 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id A358520026 for ; Thu, 21 Nov 2024 13:40:44 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id S1l3TIQN0v7o for ; Thu, 21 Nov 2024 13:40:43 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for ; Thu, 21 Nov 2024 13:40:43 +0100 (CET) Date: Thu, 21 Nov 2024 13:40:40 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: permerror client-ip=129.132.148.196; envelope-from=gabriel@erlikon.ch; helo=cotopaxi.ee.ethz.ch 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi there! In my recent venture where i linted each and every packages' description and synopsis, I found quite a bunch of false positives. These usually don't hurt when we lint single packages, but are quite annoying when linting all of them. Hence I summed my findings up in some code improvements. Have a nice week! gabber Gabriel Wicki (8): guix: lint: Fix indentation. guix: lint: Refine description start check logic. guix: lint: Allow texinfo markup at beginning of description. guix: lint: Allow texinfo markup at beginning of synopsis. guix: lint: Prevent false positives in description typo check. guix: lint: Ignore initials from double space check. guix: lint: More abbreviations. gnu: Move depending packages next to each other. gnu/packages/cpp.scm | 50 +++++++++++++++++------------------ guix/lint.scm | 56 +++++++++++++++++++++++++-------------- tests/lint.scm | 62 +++++++++++++++++++++++++++++++++++++------- 3 files changed, 114 insertions(+), 54 deletions(-) base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 1/8] guix: lint: Fix indentation. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321929921600 (code B ref 74459); Thu, 21 Nov 2024 12:44:02 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:43:12 +0000 Received: from localhost ([127.0.0.1]:49422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Wd-0000Pk-R6 for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:43:12 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:41423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Wb-0000PS-W4 for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:43:10 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 70AE820026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:43:04 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id EUCg2IO3vk-n for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:43:03 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:43:03 +0100 (CET) Date: Thu, 21 Nov 2024 13:43:00 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-synopsis-style): Add white space. * tests/lint.scm: Fix indentation. --- guix/lint.scm | 2 +- tests/lint.scm | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 8c6c20c723..31d366af46 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -737,7 +737,7 @@ (define (check-synopsis-style package) (define (check-start-with-package-name synopsis) (if (and (regexp-exec (package-name-regexp package) synopsis) - (not (starts-with-abbreviation? synopsis))) + (not (starts-with-abbreviation? synopsis))) (list (make-warning package (G_ "synopsis should not start with the package name") diff --git a/tests/lint.scm b/tests/lint.scm index 95d82d7490..b899ebc700 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -171,14 +171,14 @@ (define (warning-contains? str warnings) "description contains leading whitespace" (single-lint-warning-message (let ((pkg (dummy-package "x" - (description " Whitespace.")))) + (description " Whitespace.")))) (check-description-style pkg)))) (test-equal "description: trailing whitespace" "description contains trailing whitespace" (single-lint-warning-message (let ((pkg (dummy-package "x" - (description "Whitespace. ")))) + (description "Whitespace. ")))) (check-description-style pkg)))) (test-equal "description: pluralized 'This package'" @@ -359,18 +359,18 @@ (define (warning-contains? str warnings) '() (check-compiler-for-target (dummy-package "x" - (arguments - (list #:make-flags - #~(list (string-append "CC=" (cc-for-target)))))))) + (arguments + (list #:make-flags + #~(list (string-append "CC=" (cc-for-target)))))))) (test-equal "compiler-for-target: CC=gcc is acceptable when target=#false" '() (check-compiler-for-target ;; This (dummy) package consists purely of architecture-independent data. (dummy-package "tzdata" - (arguments - (list #:target #false - #:make-flags #~(list "CC=gcc")))))) + (arguments + (list #:target #false + #:make-flags #~(list "CC=gcc")))))) ;; The emacs-build-system sets #:tests? #f by default. (test-equal "tests-true: #:tests? #t acceptable for emacs packages" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 2/8] guix: lint: Refine description start check logic. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321931141838 (code B ref 74459); Thu, 21 Nov 2024 12:46:01 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:45:14 +0000 Received: from localhost ([127.0.0.1]:49428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6YY-0000TQ-CD for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:45:14 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:53547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6YT-0000SX-7K for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:45:09 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id D4BF720026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:44:59 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id ARlIq4z8b3LH for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:44:55 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:44:55 +0100 (CET) Date: Thu, 21 Nov 2024 13:44:52 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fix linter warnings for the following: - packages that belong to some programming language or ecosystem, e.g. python-foo or texlive-bar, - packages whose names end in a version distinction, e.g. wlroots-0.16 and - packages where the software's real name contains an underscore `_' character where our package name replaced that with a hyphen `-', e.g. wpa_supplicant and wpa-supplicant-minimal. * guix/lint.scm (check-description-style)[check-proper-start]: Add conditions. * tests/lint.scm: New tests. Change-Id: Ifc9f5cda04db59e460e287cd93afae89c7f17e3c --- guix/lint.scm | 24 +++++++++++++++--------- tests/lint.scm | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 31d366af46..39edf93219 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021-2023 Maxime Devos ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2024 Gabriel Wicki ;;; ;;; This file is part of GNU Guix. ;;; @@ -437,15 +438,20 @@ (define (check-description-style package) '())) (define (check-proper-start description) - (if (or (string-null? description) - (properly-starts-sentence? description) - (string-prefix-ci? (package-name package) description)) - '() - (list - (make-warning - package - (G_ "description should start with an upper-case letter or digit") - #:field 'description)))) + (let* ((initial (car (string-split description #\space))) + (first-word + (regexp-substitute/global #f "_" initial + 'pre "-" 'post))) + (if (or (string-null? description) + (properly-starts-sentence? description) + (string-prefix-ci? first-word (package-name package)) + (string-suffix-ci? first-word (package-name package))) + '() + (list + (make-warning + package + (G_ "description should start with an upper-case letter or digit") + #:field 'description))))) (define (check-end-of-sentence-space description) "Check that an end-of-sentence period is followed by two spaces." diff --git a/tests/lint.scm b/tests/lint.scm index b899ebc700..9297bfbaac 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021, 2023 Maxime Devos +;;; Copyright © 2024 Gabriel Wicki ;;; ;;; This file is part of GNU Guix. ;;; @@ -132,6 +133,30 @@ (define (warning-contains? str warnings) (description "x is a dummy package.")))) (check-description-style pkg))) +(test-equal "description: may start with beginning of package name" + '() + (let ((pkg (dummy-package "xyz-0.1" + (description "xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with end of package name" + '() + (let ((pkg (dummy-package "foobar-xyz" + (description "xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with non-hyphenated package name" + '() + (let ((pkg (dummy-package "foobar-xyz-minimal" + (description "foobar_xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with end of package name" + '() + (let ((pkg (dummy-package "foo-bar" + (description "bar is some thing in foo.")))) + (check-description-style pkg))) + (test-equal "description: two spaces after end of sentence" "sentences in description should be followed by two spaces; possible infraction at 3" (single-lint-warning-message -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 3/8] guix: lint: Allow texinfo markup at beginning of description. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321931402231 (code B ref 74459); Thu, 21 Nov 2024 12:46:02 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:45:40 +0000 Received: from localhost ([127.0.0.1]:49434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Z2-0000Zu-7z for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:45:40 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:38983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Z0-0000Zb-8K for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:45:38 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id DE43720026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:45:32 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id 6cBEWO_EjTAf for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:45:32 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:45:31 +0100 (CET) Date: Thu, 21 Nov 2024 13:45:28 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(starts-with-texinfo-markup?): New function. (check-description-style)[check-proper-start]: Add condition. * tests/lint.scm: Add test case. Change-Id: I674988882265d9e2041d48dba0f9627cd68bf292 --- guix/lint.scm | 8 +++++++- tests/lint.scm | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index 39edf93219..4ea02a7faa 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -370,6 +370,9 @@ (define (check-compiler-for-target package) (define (properly-starts-sentence? s) (string-match "^[(\"'`[:upper:][:digit:]]" s)) +(define (starts-with-texinfo-markup? s) + (string-match "^@(acronym|dfn|code|command|emph|file|quotation|samp|uref|url)\\{.*?\\}" s)) + (define (starts-with-abbreviation? s) "Return #t if S starts with what looks like an abbreviation or acronym." (string-match "^[A-Z][A-Z0-9]+\\>" s)) @@ -444,6 +447,7 @@ (define (check-description-style package) 'pre "-" 'post))) (if (or (string-null? description) (properly-starts-sentence? description) + (starts-with-texinfo-markup? description) (string-prefix-ci? first-word (package-name package)) (string-suffix-ci? first-word (package-name package))) '() @@ -510,7 +514,9 @@ (define (check-description-style package) (match (check-texinfo-markup description) ((and warning (? lint-warning?)) (list warning)) (plain-description - (check-proper-start plain-description)))) + (if (string-prefix? "@" description) + '() + (check-proper-start plain-description))))) (list (make-warning package (G_ "invalid description: ~s") diff --git a/tests/lint.scm b/tests/lint.scm index 9297bfbaac..df7042c470 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -121,6 +121,11 @@ (define (warning-contains? str warnings) (description "bad description.")))) (check-description-style pkg)))) +(test-equal "description: may start with texinfo markup" + '() + (check-description-style + (dummy-package "x" (description "@emph{Maxwell Equations of Software}")))) + (test-equal "description: may start with a digit" '() (let ((pkg (dummy-package "x" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 4/8] guix: lint: Allow texinfo markup at beginning of synopsis. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321931912354 (code B ref 74459); Thu, 21 Nov 2024 12:47:01 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:46:31 +0000 Received: from localhost ([127.0.0.1]:49439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Zm-0000bd-LT for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:46:31 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:38951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6Zk-0000bL-2p for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:46:24 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id B31D120026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:46:18 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id s9QxLdghsqyb for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:46:17 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:46:17 +0100 (CET) Date: Thu, 21 Nov 2024 13:46:15 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-synopsis-style)[check-proper-start]: Add condition. * tests/lint.scm: Add test case. Change-Id: I2509b3a4e7e51c6a274697ceb5f776c22e27c5f9 --- guix/lint.scm | 3 ++- tests/lint.scm | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index 4ea02a7faa..9fa22c92cc 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -740,7 +740,8 @@ (define (check-synopsis-style package) '())) (define (check-proper-start synopsis) - (if (properly-starts-sentence? synopsis) + (if (or (properly-starts-sentence? synopsis) + (starts-with-texinfo-markup? synopsis)) '() (list (make-warning package diff --git a/tests/lint.scm b/tests/lint.scm index df7042c470..6631034151 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -307,6 +307,12 @@ (define (warning-contains? str warnings) (check-synopsis-style pkg))) string In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321932692487 (code B ref 74459); Thu, 21 Nov 2024 12:48:02 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:47:49 +0000 Received: from localhost ([127.0.0.1]:49443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6b7-0000e3-8v for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:47:49 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:45643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6b5-0000dq-BR for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:47:48 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 00D1420026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:47:42 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id B-5JQczy4rCV for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:47:40 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:47:40 +0100 (CET) Date: Thu, 21 Nov 2024 13:47:37 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-description-style)[check-description-typo]: Add spaces to match strings to prevent matching false positives, like "allows tokens" or "prevents torpedoes". * tests/lint.scm: Add test. Change-Id: Ifc2ec6167a590b9d2e742dd86fecd798c4bfaa24 --- guix/lint.scm | 4 ++-- tests/lint.scm | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 9fa22c92cc..6122a9c8e3 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -504,8 +504,8 @@ (define (check-description-style package) (check-trademarks description) (check-description-typo description '(("This packages" . "This package") ("This modules" . "This module") - ("allows to" . #f) - ("permits to" . #f))) + ("allows to " . #f) + ("permits to " . #f))) ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) diff --git a/tests/lint.scm b/tests/lint.scm index 6631034151..47e31a69bf 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -219,12 +219,18 @@ (define (warning-contains? str warnings) (check-description-style pkg)))) (test-equal "description: grammar 'allows to'" - "description contains typo 'allows to'" + "description contains typo 'allows to '" (single-lint-warning-message (let ((pkg (dummy-package "x" (description "This package allows to do stuff.")))) (check-description-style pkg)))) +(test-equal "description: grammar 'allows to' 2" + '() + (let ((pkg (dummy-package "x" + (description "This package allows tokenization.")))) + (check-description-style pkg))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 6/8] guix: lint: Ignore initials from double space check. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321933052602 (code B ref 74459); Thu, 21 Nov 2024 12:49:02 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:48:25 +0000 Received: from localhost ([127.0.0.1]:49460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6bh-0000fs-93 for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:48:25 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:39045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6be-0000fe-6H for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:48:24 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 9EB4820026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:48:16 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id iIIb-bF2OF5V for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:48:15 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:48:15 +0100 (CET) Date: Thu, 21 Nov 2024 13:48:13 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Prevent false positives in initials as the are commonly used in names, e.g. Margaret E. Hamilton - which obviously do not end sentences. Check whether a period character `.' is preceded by at least two characters. This should save us from false positives when linting. * guix/lint.scm(check-description-style)[check-end-of-sentence-space] Add condition. * tests/lint.scm: Add test case. Change-Id: I42a1365aaaed2afc7308b88ebd4b0720ad362761 --- guix/lint.scm | 15 ++++++++++----- tests/lint.scm | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 6122a9c8e3..f2e8e95e61 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -463,11 +463,16 @@ (define (check-description-style package) (reverse (fold-matches "\\. [A-Z]" description '() (lambda (m r) - ;; Filter out matches of common abbreviations. - (if (find (lambda (s) - (string-suffix-ci? s (match:prefix m))) - '("i.e" "e.g" "a.k.a" "resp")) - r (cons (match:start m) r))))))) + ;; Filter out matches of common abbreviations and + ;; initials. + (let ((pre (match:prefix m))) + (if (or + (string-match "[A-Z]$" pre) ;; Initial found + (find (lambda (s) + (string-suffix-ci? s pre)) + '("i.e" "e.g" "a.k.a" "resp"))) + r + (cons (match:start m) r)))))))) (if (null? infractions) '() (list diff --git a/tests/lint.scm b/tests/lint.scm index 47e31a69bf..09be160f5d 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -173,7 +173,7 @@ (define (warning-contains? str warnings) '() (let ((pkg (dummy-package "x" (description - "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD).")))) + "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name O. Person")))) (check-description-style pkg))) (test-equal "description: may not contain trademark signs: â„¢" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 7/8] guix: lint: More abbreviations. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17321933902735 (code B ref 74459); Thu, 21 Nov 2024 12:50:01 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 12:49:50 +0000 Received: from localhost ([127.0.0.1]:49464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6d3-0000i2-OE for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:49:50 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:49739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6d1-0000hp-0U for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 07:49:47 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 8CBE820026 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:49:41 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id D_6DNamhP_ec for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:49:40 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 13:49:40 +0100 (CET) Date: Thu, 21 Nov 2024 13:49:37 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm: Allow more common abbreviations in double-space-after sentence check. * tests/lint.scm: Add tests. Change-Id: I0eedf73e5fcd0a8c67b3ae3dfa979a57fe0f6253 --- guix/lint.scm | 2 +- tests/lint.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index f2e8e95e61..b1c8834c5f 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -470,7 +470,7 @@ (define (check-description-style package) (string-match "[A-Z]$" pre) ;; Initial found (find (lambda (s) (string-suffix-ci? s pre)) - '("i.e" "e.g" "a.k.a" "resp"))) + '("i.e" "e.g" "a.k.a" "resp" "cf" "al"))) r (cons (match:start m) r)))))))) (if (null? infractions) diff --git a/tests/lint.scm b/tests/lint.scm index 09be160f5d..3e9dbd29db 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -173,7 +173,7 @@ (define (warning-contains? str warnings) '() (let ((pkg (dummy-package "x" (description - "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name O. Person")))) + "O. Person e.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name et al. cf. some paper.")))) (check-description-style pkg))) (test-equal "description: may not contain trademark signs: â„¢" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] comments References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 22:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17322279578856 (code B ref 74459); Thu, 21 Nov 2024 22:26:01 +0000 Received: (at 74459) by debbugs.gnu.org; 21 Nov 2024 22:25:57 +0000 Received: from localhost ([127.0.0.1]:52048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEFca-0002Il-RG for submit@debbugs.gnu.org; Thu, 21 Nov 2024 17:25:57 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:43161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEFcY-0002IP-IM for 74459@debbugs.gnu.org; Thu, 21 Nov 2024 17:25:55 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id B21441FED4 for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 23:25:47 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id CXad8tvq0F2T for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 23:25:46 +0100 (CET) Received: from silvi (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Thu, 21 Nov 2024 23:25:46 +0100 (CET) Date: Thu, 21 Nov 2024 23:25:43 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) some notes: i failed when creating the series and included a patch that is unrelated to the changes here. should i send in a revision? and did the software just swallow my cover letter? i was btw inspired to these changes when linting all package syopses and descriptions (issue #74329) From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 12:00:46 2024 Received: (at control) by debbugs.gnu.org; 22 Nov 2024 17:00:46 +0000 Received: from localhost ([127.0.0.1]:55317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEX1S-00047y-Bv for submit@debbugs.gnu.org; Fri, 22 Nov 2024 12:00:46 -0500 Received: from mira.cbaines.net ([212.71.252.8]:44108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEX1Q-00047n-Ak for control@debbugs.gnu.org; Fri, 22 Nov 2024 12:00:45 -0500 Received: from localhost (unknown [IPv6:2a02:6b67:e390:8b00::1ce5]) by mira.cbaines.net (Postfix) with ESMTPSA id 4B0BE27BBE2 for ; Fri, 22 Nov 2024 17:00:42 +0000 (GMT) Received: from fang (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 536201ef for ; Fri, 22 Nov 2024 17:00:41 +0000 (UTC) From: Christopher Baines To: control@debbugs.gnu.org Date: Fri, 22 Nov 2024 17:00:41 +0000 Message-ID: <87serjdwzq.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: retitle 74459 [PATCH 0/8] Linter improvements (eliminate false positives) thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.71.252.8 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [212.71.252.8 listed in sa-accredit.habeas.com] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) retitle 74459 [PATCH 0/8] Linter improvements (eliminate false positives) thanks From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH 2/8] guix: lint: Refine description start check logic. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 13:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Gabriel Wicki Cc: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17328884605158 (code B ref 74459); Fri, 29 Nov 2024 13:55:01 +0000 Received: (at 74459) by debbugs.gnu.org; 29 Nov 2024 13:54:20 +0000 Received: from localhost ([127.0.0.1]:41551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH1Rr-0001L7-R7 for submit@debbugs.gnu.org; Fri, 29 Nov 2024 08:54:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH1Rn-0001Kg-6B for 74459@debbugs.gnu.org; Fri, 29 Nov 2024 08:54:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tH1Rf-0003uW-0X; Fri, 29 Nov 2024 08:54:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=uRqHh8q6+WVeEzXWTz4nC/em5bs5U91gMcMzF69IoRo=; b=DCdOmHf8XZHbKWMziwtu MDafF+oqP1jXPRNz06VHFDwQmcwqwXyfXIEJPZjK3DQRR87cbRiKA5jkVk7xF4wFfay/O5Yr+EAhz K3YEDzjc0JVOOmybDgwih+XaVw5BLS3FmyH13xR2tOCRT7pDq2ys4H+m/OxXgKf7BDevrqeOWMjvf etX7xvYgHB2ffhhLbDaMsso3zLJ+3Yit1vVpVqeWM06KlO1f18iX4dOGXqS9AeWRSYJoSXHKE1Xjp g1OpB0gfuCkUb9rrBiFT/F0GtvDaSLLKAlzIgqi8gufZ/FivceKeQ/QepkMqSG9vaZtJJBZPhLcsp 7WlzRUEF2cdgTA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Gabriel Wicki's message of "Thu, 21 Nov 2024 13:44:52 +0100") References: Date: Fri, 29 Nov 2024 14:54:00 +0100 Message-ID: <874j3q16yv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Gabriel Wicki skribis: > Fix linter warnings for the following: > > - packages that belong to some programming language or ecosystem, > e.g. python-foo or texlive-bar, > - packages whose names end in a version distinction, e.g. wlroots-0.16 a= nd > - packages where the software's real name contains an underscore `_' > character where our package name replaced that with a hyphen `-', > e.g. wpa_supplicant and wpa-supplicant-minimal. > > * guix/lint.scm (check-description-style)[check-proper-start]: Add condit= ions. > * tests/lint.scm: New tests. > > Change-Id: Ifc9f5cda04db59e460e287cd93afae89c7f17e3c [...] > (define (check-proper-start description) > - (if (or (string-null? description) > - (properly-starts-sentence? description) > - (string-prefix-ci? (package-name package) description)) > - '() > - (list > - (make-warning > - package > - (G_ "description should start with an upper-case letter or dig= it") > - #:field 'description)))) > + (let* ((initial (car (string-split description #\space))) In general we try to avoid =E2=80=98car=E2=80=99 and =E2=80=98cdr=E2=80=99: https://guix.gnu.org/manual/devel/en/html_node/Data-Types-and-Pattern-Mat= ching.html But also, instead of traversing all of =E2=80=98description=E2=80=99, perha= ps you could have something like (untested): (define (first-word str) (let* ((str (string-trim str)) (length (or (and=3D> (string-index str #\space) 1+) (string-leng= th str)))) (string-take str length))) Ludo=E2=80=99. From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] comments Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 29 Nov 2024 13:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Gabriel Wicki Cc: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.17328885745693 (code B ref 74459); Fri, 29 Nov 2024 13:57:02 +0000 Received: (at 74459) by debbugs.gnu.org; 29 Nov 2024 13:56:14 +0000 Received: from localhost ([127.0.0.1]:41559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH1Th-0001Tk-JQ for submit@debbugs.gnu.org; Fri, 29 Nov 2024 08:56:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tH1Te-0001TX-Oz for 74459@debbugs.gnu.org; Fri, 29 Nov 2024 08:56:11 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tH1TZ-00050o-Df; Fri, 29 Nov 2024 08:56:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=lnVkdXcN8ocv0TphxBUB1UpseDXLKhxVLcSh1ucwWUc=; b=Q12e7UjK4edHDEb1D4lD rqz3EqeszPY5eY1Mw6sZYpbZTjKVVehGRjMZur1XlYcb/hCEoi7yyAud/v2FHeES58KrDpJ2qfQ2F muRDg035+MQO/eYv01W1R7keW6cY1feD90oZhaSSjWvqjpR4tIba3R3IkTkZwpifYMuP/EiYsi1gI 2WV4U3DOcr55XBjnfPHwOAwk/T2ezCIenvAEBxq0MKb9VqyaJqkQoqo92oFXhqpP8JzNOZQd+BOte DdBNsFx9pB+VfRsOm72nb5GZmimtqpwoNrvJrkvyhVr0XLIRmMMxq8aXYV2/J9zNHnow7M1cu4lAE J9E5HyEB9wxPDg==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Gabriel Wicki's message of "Thu, 21 Nov 2024 23:25:43 +0100") References: Date: Fri, 29 Nov 2024 14:55:35 +0100 Message-ID: <87zfliywiw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gabriel Wicki skribis: > some notes: i failed when creating the series and included a > patch that is unrelated to the changes here. should i send in a > revision? > > and did the software just swallow my cover letter? > > i was btw inspired to these changes when linting all package syopses and > descriptions (issue #74329) I think it went well! Apart from the minor suggestions I sent, it LGTM. Could you send updated patches? Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 1/7] guix: lint: Fix indentation. Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317885614907 (code B ref 74459); Mon, 02 Dec 2024 22:35:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:34:16 +0000 Received: from localhost ([127.0.0.1]:56861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIEzf-0003sM-Q2 for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:34:16 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:42393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIEze-0003s1-CK for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:34:15 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 7F2251FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:34:07 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id 9T5Prdr4eVtv for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:34:06 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:34:06 +0100 (CET) Date: Mon, 2 Dec 2024 23:34:03 +0100 From: Gabriel Wicki Message-ID: References: <87zfliywiw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zfliywiw.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-synopsis-style): Add white space. * tests/lint.scm: Fix indentation. --- guix/lint.scm | 2 +- tests/lint.scm | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 8c6c20c723..31d366af46 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -737,7 +737,7 @@ (define (check-synopsis-style package) (define (check-start-with-package-name synopsis) (if (and (regexp-exec (package-name-regexp package) synopsis) - (not (starts-with-abbreviation? synopsis))) + (not (starts-with-abbreviation? synopsis))) (list (make-warning package (G_ "synopsis should not start with the package name") diff --git a/tests/lint.scm b/tests/lint.scm index 95d82d7490..b899ebc700 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -171,14 +171,14 @@ (define (warning-contains? str warnings) "description contains leading whitespace" (single-lint-warning-message (let ((pkg (dummy-package "x" - (description " Whitespace.")))) + (description " Whitespace.")))) (check-description-style pkg)))) (test-equal "description: trailing whitespace" "description contains trailing whitespace" (single-lint-warning-message (let ((pkg (dummy-package "x" - (description "Whitespace. ")))) + (description "Whitespace. ")))) (check-description-style pkg)))) (test-equal "description: pluralized 'This package'" @@ -359,18 +359,18 @@ (define (warning-contains? str warnings) '() (check-compiler-for-target (dummy-package "x" - (arguments - (list #:make-flags - #~(list (string-append "CC=" (cc-for-target)))))))) + (arguments + (list #:make-flags + #~(list (string-append "CC=" (cc-for-target)))))))) (test-equal "compiler-for-target: CC=gcc is acceptable when target=#false" '() (check-compiler-for-target ;; This (dummy) package consists purely of architecture-independent data. (dummy-package "tzdata" - (arguments - (list #:target #false - #:make-flags #~(list "CC=gcc")))))) + (arguments + (list #:target #false + #:make-flags #~(list "CC=gcc")))))) ;; The emacs-build-system sets #:tests? #f by default. (test-equal "tests-true: #:tests? #t acceptable for emacs packages" base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 2/7] guix: lint: Refine description start check logic. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317892415414 (code B ref 74459); Mon, 02 Dec 2024 22:36:01 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:35:24 +0000 Received: from localhost ([127.0.0.1]:56868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF0m-00040Y-6N for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:35:24 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:35205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF0j-0003zg-Lj for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:35:22 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 4F6AD1FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:35:16 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id HwsZpb35_-mY for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:35:12 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:35:12 +0100 (CET) Date: Mon, 2 Dec 2024 23:35:09 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Fix linter warnings for the following: - packages that belong to some programming language or ecosystem, e.g. python-foo or texlive-bar, - packages whose names end in a version distinction, e.g. wlroots-0.16 and - packages where the software's real name contains an underscore `_' character where our package name replaced that with a hyphen `-', e.g. wpa_supplicant and wpa-supplicant-minimal. * guix/lint.scm (check-description-style)[check-proper-start]: Add conditions. * tests/lint.scm: New tests. Change-Id: Ifc9f5cda04db59e460e287cd93afae89c7f17e3c --- guix/lint.scm | 27 ++++++++++++++++++--------- tests/lint.scm | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 31d366af46..63d101ebf9 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021-2023 Maxime Devos ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2024 Gabriel Wicki ;;; ;;; This file is part of GNU Guix. ;;; @@ -437,15 +438,23 @@ (define (check-description-style package) '())) (define (check-proper-start description) - (if (or (string-null? description) - (properly-starts-sentence? description) - (string-prefix-ci? (package-name package) description)) - '() - (list - (make-warning - package - (G_ "description should start with an upper-case letter or digit") - #:field 'description)))) + (let* ((initial + (string-take description + (or (string-index description #\space) + 0))) + (first-word + (regexp-substitute/global #f "_" initial + 'pre "-" 'post))) + (if (or (string-null? description) + (properly-starts-sentence? description) + (string-prefix-ci? first-word (package-name package)) + (string-suffix-ci? first-word (package-name package))) + '() + (list + (make-warning + package + (G_ "description should start with an upper-case letter or digit") + #:field 'description))))) (define (check-end-of-sentence-space description) "Check that an end-of-sentence period is followed by two spaces." diff --git a/tests/lint.scm b/tests/lint.scm index b899ebc700..9297bfbaac 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021, 2023 Maxime Devos +;;; Copyright © 2024 Gabriel Wicki ;;; ;;; This file is part of GNU Guix. ;;; @@ -132,6 +133,30 @@ (define (warning-contains? str warnings) (description "x is a dummy package.")))) (check-description-style pkg))) +(test-equal "description: may start with beginning of package name" + '() + (let ((pkg (dummy-package "xyz-0.1" + (description "xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with end of package name" + '() + (let ((pkg (dummy-package "foobar-xyz" + (description "xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with non-hyphenated package name" + '() + (let ((pkg (dummy-package "foobar-xyz-minimal" + (description "foobar_xyz is a dummy package.")))) + (check-description-style pkg))) + +(test-equal "description: may start with end of package name" + '() + (let ((pkg (dummy-package "foo-bar" + (description "bar is some thing in foo.")))) + (check-description-style pkg))) + (test-equal "description: two spaces after end of sentence" "sentences in description should be followed by two spaces; possible infraction at 3" (single-lint-warning-message -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 3/7] guix: lint: Allow texinfo markup at beginning of description. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317901815607 (code B ref 74459); Mon, 02 Dec 2024 22:37:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:36:58 +0000 Received: from localhost ([127.0.0.1]:56872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF2H-00043f-Ro for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:36:58 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:58327) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF2F-00043H-PY for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:36:56 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 6E0D71FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:36:50 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id 05Rtjs38Gr3C for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:36:49 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:36:49 +0100 (CET) Date: Mon, 2 Dec 2024 23:36:44 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(starts-with-texinfo-markup?): New function. (check-description-style)[check-proper-start]: Add condition. * tests/lint.scm: Add test case. Change-Id: I674988882265d9e2041d48dba0f9627cd68bf292 --- guix/lint.scm | 8 +++++++- tests/lint.scm | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index 63d101ebf9..d6d48ad27c 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -370,6 +370,9 @@ (define (check-compiler-for-target package) (define (properly-starts-sentence? s) (string-match "^[(\"'`[:upper:][:digit:]]" s)) +(define (starts-with-texinfo-markup? s) + (string-match "^@(acronym|dfn|code|command|emph|file|quotation|samp|uref|url)\\{.*?\\}" s)) + (define (starts-with-abbreviation? s) "Return #t if S starts with what looks like an abbreviation or acronym." (string-match "^[A-Z][A-Z0-9]+\\>" s)) @@ -447,6 +450,7 @@ (define (check-description-style package) 'pre "-" 'post))) (if (or (string-null? description) (properly-starts-sentence? description) + (starts-with-texinfo-markup? description) (string-prefix-ci? first-word (package-name package)) (string-suffix-ci? first-word (package-name package))) '() @@ -513,7 +517,9 @@ (define (check-description-style package) (match (check-texinfo-markup description) ((and warning (? lint-warning?)) (list warning)) (plain-description - (check-proper-start plain-description)))) + (if (string-prefix? "@" description) + '() + (check-proper-start plain-description))))) (list (make-warning package (G_ "invalid description: ~s") diff --git a/tests/lint.scm b/tests/lint.scm index 9297bfbaac..df7042c470 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -121,6 +121,11 @@ (define (warning-contains? str warnings) (description "bad description.")))) (check-description-style pkg)))) +(test-equal "description: may start with texinfo markup" + '() + (check-description-style + (dummy-package "x" (description "@emph{Maxwell Equations of Software}")))) + (test-equal "description: may start with a digit" '() (let ((pkg (dummy-package "x" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 4/7] guix: lint: Allow texinfo markup at beginning of synopsis. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317907115721 (code B ref 74459); Mon, 02 Dec 2024 22:38:01 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:37:51 +0000 Received: from localhost ([127.0.0.1]:56876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF39-00045V-9D for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:37:51 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:44533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF37-00045C-Ix for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:37:49 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 3ADA41FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:37:44 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id MCmylxrO8gmV for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:37:43 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:37:43 +0100 (CET) Date: Mon, 2 Dec 2024 23:37:40 +0100 From: Gabriel Wicki Message-ID: <5z4dvh5gzjudtvzzp3pvglimxxm45uby6lnkirer2hhujy26ld@zezljqwf3342> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-synopsis-style)[check-proper-start]: Add condition. * tests/lint.scm: Add test case. Change-Id: I2509b3a4e7e51c6a274697ceb5f776c22e27c5f9 --- guix/lint.scm | 3 ++- tests/lint.scm | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index d6d48ad27c..396ee01fed 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -743,7 +743,8 @@ (define (check-synopsis-style package) '())) (define (check-proper-start synopsis) - (if (properly-starts-sentence? synopsis) + (if (or (properly-starts-sentence? synopsis) + (starts-with-texinfo-markup? synopsis)) '() (list (make-warning package diff --git a/tests/lint.scm b/tests/lint.scm index df7042c470..6631034151 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -307,6 +307,12 @@ (define (warning-contains? str warnings) (check-synopsis-style pkg))) string In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317914515892 (code B ref 74459); Mon, 02 Dec 2024 22:40:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:39:05 +0000 Received: from localhost ([127.0.0.1]:56880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF4K-00048G-Pz for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:39:05 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:52101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF4I-00047k-UK for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:39:03 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 92C6E1FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:57 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id qTJ4_X8kStFs for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:56 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:56 +0100 (CET) Date: Mon, 2 Dec 2024 23:38:51 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm(check-description-style)[check-description-typo]: Add spaces to match strings to prevent matching false positives, like "allows tokens" or "prevents torpedoes". * tests/lint.scm: Add test. Change-Id: Ifc2ec6167a590b9d2e742dd86fecd798c4bfaa24 --- guix/lint.scm | 4 ++-- tests/lint.scm | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 396ee01fed..ee2059d812 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -507,8 +507,8 @@ (define (check-description-style package) (check-trademarks description) (check-description-typo description '(("This packages" . "This package") ("This modules" . "This module") - ("allows to" . #f) - ("permits to" . #f))) + ("allows to " . #f) + ("permits to " . #f))) ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) diff --git a/tests/lint.scm b/tests/lint.scm index 6631034151..47e31a69bf 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -219,12 +219,18 @@ (define (warning-contains? str warnings) (check-description-style pkg)))) (test-equal "description: grammar 'allows to'" - "description contains typo 'allows to'" + "description contains typo 'allows to '" (single-lint-warning-message (let ((pkg (dummy-package "x" (description "This package allows to do stuff.")))) (check-description-style pkg)))) +(test-equal "description: grammar 'allows to' 2" + '() + (let ((pkg (dummy-package "x" + (description "This package allows tokenization.")))) + (check-description-style pkg))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 6/7] guix: lint: Ignore initials from double space check. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317920015986 (code B ref 74459); Mon, 02 Dec 2024 22:40:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:40:00 +0000 Received: from localhost ([127.0.0.1]:56883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF5E-00049m-8O for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:40:00 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:46703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF5C-00049V-LQ for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:39:59 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 248CF1FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:39:53 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id mPpMhD7T3zdo for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:39:51 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:39:51 +0100 (CET) Date: Mon, 2 Dec 2024 23:39:48 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Prevent false positives in initials as the are commonly used in names, e.g. Margaret E. Hamilton - which obviously do not end sentences. Check whether a period character `.' is preceded by at least two characters. This should save us from false positives when linting. * guix/lint.scm(check-description-style)[check-end-of-sentence-space] Add condition. * tests/lint.scm: Add test case. Change-Id: I42a1365aaaed2afc7308b88ebd4b0720ad362761 --- guix/lint.scm | 15 ++++++++++----- tests/lint.scm | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index ee2059d812..1c8be911eb 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -466,11 +466,16 @@ (define (check-description-style package) (reverse (fold-matches "\\. [A-Z]" description '() (lambda (m r) - ;; Filter out matches of common abbreviations. - (if (find (lambda (s) - (string-suffix-ci? s (match:prefix m))) - '("i.e" "e.g" "a.k.a" "resp")) - r (cons (match:start m) r))))))) + ;; Filter out matches of common abbreviations and + ;; initials. + (let ((pre (match:prefix m))) + (if (or + (string-match "[A-Z]$" pre) ;; Initial found + (find (lambda (s) + (string-suffix-ci? s pre)) + '("i.e" "e.g" "a.k.a" "resp"))) + r + (cons (match:start m) r)))))))) (if (null? infractions) '() (list diff --git a/tests/lint.scm b/tests/lint.scm index 47e31a69bf..09be160f5d 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -173,7 +173,7 @@ (define (warning-contains? str warnings) '() (let ((pkg (dummy-package "x" (description - "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD).")))) + "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name O. Person")))) (check-description-style pkg))) (test-equal "description: may not contain trademark signs: â„¢" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 7/7] guix: lint: More abbreviations. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317925216466 (code B ref 74459); Mon, 02 Dec 2024 22:41:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:40:52 +0000 Received: from localhost ([127.0.0.1]:56892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF63-0004HW-Nt for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:40:52 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:40841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF61-0004HF-BG for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:40:49 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id DB4861FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:40:43 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id ZQdvLZoFlGiA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:40:38 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:40:38 +0100 (CET) Date: Mon, 2 Dec 2024 23:40:35 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * guix/lint.scm: Allow more common abbreviations in double-space-after sentence check. * tests/lint.scm: Add tests. Change-Id: I0eedf73e5fcd0a8c67b3ae3dfa979a57fe0f6253 --- guix/lint.scm | 2 +- tests/lint.scm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 1c8be911eb..1ea43df6b3 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -473,7 +473,7 @@ (define (check-description-style package) (string-match "[A-Z]$" pre) ;; Initial found (find (lambda (s) (string-suffix-ci? s pre)) - '("i.e" "e.g" "a.k.a" "resp"))) + '("i.e" "e.g" "a.k.a" "resp" "cf" "al"))) r (cons (match:start m) r)))))))) (if (null? infractions) diff --git a/tests/lint.scm b/tests/lint.scm index 09be160f5d..3e9dbd29db 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -173,7 +173,7 @@ (define (warning-contains? str warnings) '() (let ((pkg (dummy-package "x" (description - "E.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name O. Person")))) + "O. Person e.g. Foo, i.e. Bar resp. Baz (a.k.a. DVD). Name et al. cf. some paper.")))) (check-description-style pkg))) (test-equal "description: may not contain trademark signs: â„¢" -- 2.46.0 From unknown Sun Jun 22 17:16:01 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] comments Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317958117452 (code B ref 74459); Mon, 02 Dec 2024 22:47:01 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:46:21 +0000 Received: from localhost ([127.0.0.1]:56900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIFBN-0004XQ-KY for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:46:21 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:56285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIFBM-0004XE-2O for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:46:20 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 226C21FFFF; Mon, 2 Dec 2024 23:46:14 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id W-9AGVFup7Bu; Mon, 2 Dec 2024 23:46:12 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA; Mon, 2 Dec 2024 23:46:12 +0100 (CET) Date: Mon, 2 Dec 2024 23:46:09 +0100 From: Gabriel Wicki Message-ID: References: <87zfliywiw.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87zfliywiw.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks for your review, Ludo'! I've addressed your concern and came up with an even more readable solution -- I hope you agree. Thanks for merging and have a nice week, gabber From unknown Sun Jun 22 17:16:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gabriel Wicki Subject: bug#74459: closed (Re: [bug#74459] comments) Message-ID: References: <8734itcg76.fsf@gnu.org> X-Gnu-PR-Message: they-closed 74459 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 74459@debbugs.gnu.org Date: Thu, 12 Dec 2024 11:08:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1734001683-3364-1" This is a multi-part message in MIME format... ------------=_1734001683-3364-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #74459: [PATCH 0/8] Linter improvements (eliminate false positives) which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 74459@debbugs.gnu.org. --=20 74459: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D74459 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1734001683-3364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 74459-done) by debbugs.gnu.org; 12 Dec 2024 11:07:57 +0000 Received: from localhost ([127.0.0.1]:37847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLh2y-0000rm-Lk for submit@debbugs.gnu.org; Thu, 12 Dec 2024 06:07:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLh2w-0000rY-Sq for 74459-done@debbugs.gnu.org; Thu, 12 Dec 2024 06:07:55 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLh2o-00046B-RS; Thu, 12 Dec 2024 06:07:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=bTpD6gGidPoXDzXTOP/aLsIG51Xr6uxeHXH+JRfl65M=; b=VLPwYg0JvtFWmDA1TTz1 1M+i3wSdY6SCndbVXMfedEVNZBdmMaFZ/acawRbi/H3xCCEbIurLwSo1xqC0XVMK9pxYCXBDlIgBr +NbHEZ/0KNqrdTAqZRWVgP+fl2Gtn7sftDM0ZSddc8+uIE4JuxsWqF4Tpxg1aMk9aY8T7vi/0dhDA FZIQ8N4MSufIC5gF1tsDslRBsdhcdnZP7w8KMghubX9Rtzqqg10X78SWjm805s2TDXNWw3R9kXoX0 7qBEkGk5CHZ2d4LHri0W271WTFbKgmtBSr7S2CXDULzLy9oYjo+ZuXFKA1/z2F7v2QATwW8tXMTpd rj+QLeSJnLje1Q==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Gabriel Wicki Subject: Re: [bug#74459] comments In-Reply-To: (Gabriel Wicki's message of "Mon, 2 Dec 2024 23:46:09 +0100") References: <87zfliywiw.fsf@gnu.org> Date: Thu, 12 Dec 2024 12:07:41 +0100 Message-ID: <8734itcg76.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74459-done Cc: 74459-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Gabriel Wicki skribis: > Thanks for your review, Ludo'! I've addressed your concern and came up > with an even more readable solution -- I hope you agree. Yes, that=E2=80=99s nice. Applied, thanks! I removed =E2=80=9Cguix:=E2=80=9D from commit subject lines and also follow= ed up with a commit that pre-compiles the regexp instead of recompiling it every time via =E2=80=98string-match=E2=80=99 (it can make a difference when linting a= large number of packages as is the case in the Data Service for example). Thanks! Ludo=E2=80=99. ------------=_1734001683-3364-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Nov 2024 12:40:55 +0000 Received: from localhost ([127.0.0.1]:49417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6UR-0000LD-9X for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:40:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:33970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE6UO-0000L3-PE for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:40:53 -0500 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 1tE6UO-0003dr-IA for guix-patches@gnu.org; Thu, 21 Nov 2024 07:40:52 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tE6UJ-0005Xj-Q3 for guix-patches@gnu.org; Thu, 21 Nov 2024 07:40:52 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id A358520026 for ; Thu, 21 Nov 2024 13:40:44 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id S1l3TIQN0v7o for ; Thu, 21 Nov 2024 13:40:43 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for ; Thu, 21 Nov 2024 13:40:43 +0100 (CET) Date: Thu, 21 Nov 2024 13:40:40 +0100 From: Gabriel Wicki To: guix-patches@gnu.org Subject: [PATCH 0/8] Linter improvements (eliminate false positives) Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: permerror client-ip=129.132.148.196; envelope-from=gabriel@erlikon.ch; helo=cotopaxi.ee.ethz.ch 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi there! In my recent venture where i linted each and every packages' description and synopsis, I found quite a bunch of false positives. These usually don't hurt when we lint single packages, but are quite annoying when linting all of them. Hence I summed my findings up in some code improvements. Have a nice week! gabber Gabriel Wicki (8): guix: lint: Fix indentation. guix: lint: Refine description start check logic. guix: lint: Allow texinfo markup at beginning of description. guix: lint: Allow texinfo markup at beginning of synopsis. guix: lint: Prevent false positives in description typo check. guix: lint: Ignore initials from double space check. guix: lint: More abbreviations. gnu: Move depending packages next to each other. gnu/packages/cpp.scm | 50 +++++++++++++++++------------------ guix/lint.scm | 56 +++++++++++++++++++++++++-------------- tests/lint.scm | 62 +++++++++++++++++++++++++++++++++++++------- 3 files changed, 114 insertions(+), 54 deletions(-) base-commit: 33665c52c4670bc3b4d337c89ac9cc6c4c69b26f -- 2.46.0 ------------=_1734001683-3364-1--