From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH 0/2] Check for trailing whitespace in synopsis and description. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162240362013635 (code B ref -1); Sun, 30 May 2021 19:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 May 2021 19:40:20 +0000 Received: from localhost ([127.0.0.1]:60373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRIK-0003Xq-Hu for submit@debbugs.gnu.org; Sun, 30 May 2021 15:40:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:49140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRII-0003Xj-TF for submit@debbugs.gnu.org; Sun, 30 May 2021 15:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnRII-0001q9-02 for guix-patches@gnu.org; Sun, 30 May 2021 15:40:18 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:37960 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnRIG-0000hy-0C for guix-patches@gnu.org; Sun, 30 May 2021 15:40:17 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622403610; bh=NUkt561RJsr8yH1y5HMIVoKsKxtrgQSGNZDzt5dkwRM=; h=From:To:Subject:Date; b=iGlF6HQckgoj2fH1OmtWK38LADSR7XAGjBVv1E71/nKLM8GcknI+k+26dZIZtgZjo MP7LhLjGuuXWaijbswm2Yb5QX05whCjifqmeglGPH0gUuUzXOCTkOSbHQUdrrIHpKs cZd8Oq+JbB4DI9vuLwjPkr2XHD5ct3pqtabvbaYw= Message-Id: Date: Sun, 30 May 2021 21:40:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 30 X-Spam_score: 3.0 X-Spam_bar: +++ X-Spam_report: (3.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.602, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.7 (++) 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: This patch series adds to checkers that check for trailing whitespace in synopses and descriptions. There is =?UTF-8?Q?=E2=80=98report-trailing-white-space=E2=80=99,?= but it only checks for trailing whitespace in the file itself, not in the string for the synopsis/description. Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 1.6 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: 0.1 (/) This patch series adds to checkers that check for trailing whitespace in synopses and descriptions. There is =E2=80=98report-trailing-white-space=E2=80=99, but it only checks = for trailing whitespace in the file itself, not in the string for the synopsis/description. Xinglu Chen (2): lint: Check for trailing whitespace in synopsis. lint: Check for trailing whitespace in description. guix/lint.scm | 22 +++++++++++++++++++++- tests/lint.scm | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) base-commit: cefa260fb42693b87545b1baab8cef9723827f80 --=20 2.31.1 From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH 1/2] lint: Check for trailing whitespace in synopsis. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 19:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org Received: via spool by 48750-submit@debbugs.gnu.org id=B48750.162240376513863 (code B ref 48750); Sun, 30 May 2021 19:43:01 +0000 Received: (at 48750) by debbugs.gnu.org; 30 May 2021 19:42:45 +0000 Received: from localhost ([127.0.0.1]:60378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRKe-0003bX-TU for submit@debbugs.gnu.org; Sun, 30 May 2021 15:42:45 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46304 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRKd-0003bL-Of for 48750@debbugs.gnu.org; Sun, 30 May 2021 15:42:44 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622403758; bh=JdFH68gLYKts9C6/HGi5LqfW6UoeCYetIW5jLRpspkA=; h=From:To:Subject:In-Reply-To:References:Date; b=TXLnwRzNCLzpp9Kc73toxMxJ3dqvr0SI0W1ySWgWHjrtwy+RKt5ZsDNycqmd4/et6 Tu6gFdLnNSD/FR+yRswAapzJlwe1CDvlkPt/O+SHCR2iZ874ydo3xF9T3wh2hOxByE jtOvbrmrDBA3vBhYlrk26YYg755rhqd5g9ZCsnic= In-Reply-To: References: Message-Id: <2263996fdbd5853d7c16ea5fade00f1e1c0a448d.1622403325.git.public@yoctocell.xyz> Date: Sun, 30 May 2021 21:42:37 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.9 (++) 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: * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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.9 (+) 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: * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++ [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index a2d6418b85..d2ef4f34b2 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -456,13 +456,23 @@ markup is valid return a plain-text version of SYNOPSIS, otherwise #f." (G_ "Texinfo markup in synopsis is invalid") #:field 'synopsis))))) + (define (check-no-trailing-whitespace synopsis) + "Check that SYNOPSIS doesn't have trailing whitespace." + (if (string-suffix? " " synopsis) + (list + (make-warning package + (G_ "synopsis contains trailing whitespace") + #:field 'synopsis)) + '())) + (define checks (list check-proper-start check-final-period check-start-article check-start-with-package-name check-synopsis-length - check-texinfo-markup)) + check-texinfo-markup + check-no-trailing-whitespace)) (match (package-synopsis package) ("" diff --git a/tests/lint.scm b/tests/lint.scm index d54fafc1d2..dddbf0679f 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -271,6 +271,13 @@ (description "Imagine this is Taylor UUCP.")))) (check-synopsis-style pkg))) +(test-equal "synopsis: contains trailing whitespace" + "synopsis contains trailing whitespace" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (synopsis "Whitespace ")))) + (check-synopsis-style pkg)))) + (test-equal "name: use underscore in package name" "name should use hyphens instead of underscores" (single-lint-warning-message -- 2.31.1 From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH 2/2] lint: Check for trailing whitespace in description. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org Received: via spool by 48750-submit@debbugs.gnu.org id=B48750.162240378813924 (code B ref 48750); Sun, 30 May 2021 19:44:02 +0000 Received: (at 48750) by debbugs.gnu.org; 30 May 2021 19:43:08 +0000 Received: from localhost ([127.0.0.1]:60382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRL2-0003cW-6A for submit@debbugs.gnu.org; Sun, 30 May 2021 15:43:08 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:46318 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRKz-0003bu-FJ for 48750@debbugs.gnu.org; Sun, 30 May 2021 15:43:06 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622403779; bh=MI3eL/24LsP/zExvoDka6O8lC17NY5Hrxd2zx145Axo=; h=From:To:Subject:In-Reply-To:References:Date; b=d0UhsyKE3knmROUlmm1yWPME53Pzd3i/7AXUkuVpULmylG9earKSk+021TURFtiXG weDV5gNqSwBdEgRFwbEAOGb9KMfIwsqTf6eB+2j28auuKnLe3KO8lfHLn9YMknyxfp jPPq8fVw9Wwb1tFdIdU53L8fqvYr6gsu1qlCJh1k= In-Reply-To: References: Message-Id: <7f6526ca35091658589205efeb9f99f5e3a0c1e9.1622403325.git.public@yoctocell.xyz> Date: Sun, 30 May 2021 21:42:59 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.9 (++) 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: * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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.9 (+) 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: * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/guix/lint.scm b/guix/lint.scm index d2ef4f34b2..4fdebc0aff 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -278,6 +278,15 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") infractions) #:field 'description))))) + (define (check-no-trailing-whitespace DESCRIPTION) + "Check that DESCRIPTION doesn't have trailing whitespace." + (if (string-suffix? " " description) + (list + (make-warning package + (G_ "description contains trailing whitespace") + #:field 'description)) + '())) + (let ((description (package-description package))) (if (string? description) (append @@ -287,6 +296,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) + (check-no-trailing-whitespace) (match (check-texinfo-markup description) ((and warning (? lint-warning?)) (list warning)) (plain-description diff --git a/tests/lint.scm b/tests/lint.scm index dddbf0679f..5c1e9d3db2 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -160,6 +160,13 @@ (description "This is a 'quoted' thing.")))) (check-description-style pkg)))) +(test-equal "description: trailing whitespace" + "description contains trailing whitespace" + (single-lint-warning-message + (let ((pkgs (dummy-package "x" + (description "Whitespace. ")))) + (check-description-style pkg)))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message -- 2.31.1 From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH v2 0/2] Check for trailing whitespace in synopsis and description. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org Received: via spool by 48750-submit@debbugs.gnu.org id=B48750.162240633017838 (code B ref 48750); Sun, 30 May 2021 20:26:02 +0000 Received: (at 48750) by debbugs.gnu.org; 30 May 2021 20:25:30 +0000 Received: from localhost ([127.0.0.1]:60429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnS02-0004de-8I for submit@debbugs.gnu.org; Sun, 30 May 2021 16:25:30 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47246 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRzy-0004dP-TT for 48750@debbugs.gnu.org; Sun, 30 May 2021 16:25:29 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622406318; bh=MGemhaUU5jrCV60Q4wgwxuspfqHrqGAlR/x3j/DZfkw=; h=From:To:Subject:In-Reply-To:References:Date; b=CrC81vFaaYH694HI/oLey/wSjySPpDa8FzN0rLTZg0223ANPabnWC/0YZaIok4512 oHoL3Xjo3ZL4YACrS2aOR/p+reTLJkUSMilG1nuXbcxVCo7NbrJQ+1qTE6DU67e5R1 Foy4MOW5rqQ103YBBLu7Nk6c5ih9FpZ98EPBZxRM= In-Reply-To: References: Message-Id: Date: Sun, 30 May 2021 22:25:18 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.9 (++) 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: Sorry, I had some unstaged changes which I forgot to commit. Xinglu Chen (2): lint: Check for trailing whitespace in synopsis. lint: Check for trailing whitespace in description. guix/lint.scm | 22 +++++++++++++++++++++- tests/lint.scm | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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.9 (+) 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: Sorry, I had some unstaged changes which I forgot to commit. Xinglu Chen (2): lint: Check for trailing whitespace in synopsis. lint: Check for trailing whitespace in description. guix/lint.scm | 22 +++++++++++++++++++++- tests/lint.scm | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Sorry, I had some unstaged changes which I forgot to commit. Xinglu Chen (2): lint: Check for trailing whitespace in synopsis. lint: Check for trailing whitespace in description. guix/lint.scm | 22 +++++++++++++++++++++- tests/lint.scm | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) base-commit: cefa260fb42693b87545b1baab8cef9723827f80 -- 2.31.1 From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH 1/2] lint: Check for trailing whitespace in synopsis. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 20:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org Cc: Xinglu Chen Received: via spool by 48750-submit@debbugs.gnu.org id=B48750.162240666618455 (code B ref 48750); Sun, 30 May 2021 20:32:01 +0000 Received: (at 48750) by debbugs.gnu.org; 30 May 2021 20:31:06 +0000 Received: from localhost ([127.0.0.1]:60441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnS5S-0004nZ-Dr for submit@debbugs.gnu.org; Sun, 30 May 2021 16:31:06 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47388 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnS5N-0004my-C1 for 48750@debbugs.gnu.org; Sun, 30 May 2021 16:31:04 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622406655; bh=CslEwfv8kXJtf2B78ZoxdcFHNNotN0arfhvVHFy29ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Sslaf/VrQ9IsOYUJRWtPhjuzlxltxqGk2uk7UtWFgtiXFFP/ZTzPncNsmDOmM+cz7 T4kWq3zoBGqkJcErJvD9+l0oAjVGWhPf92xQU/Mv8aM4U2PWEf/M9vBg+HxZXcYnzu 7CDOu1a2yf5ZZuDzrvvvUxugTGuaqqFHRK6IXei4= Date: Sun, 30 May 2021 22:30:31 +0200 Message-Id: <2263996fdbd5853d7c16ea5fade00f1e1c0a448d.1622406578.git.public@yoctocell.xyz> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.9 (++) 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: * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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.9 (+) 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: * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++ [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/lint.scm (check-synopsis-style): Check for trailing whitespace. * tests/lint.scm ("synopsis: contains trailing whitespace"): New test. --- guix/lint.scm | 12 +++++++++++- tests/lint.scm | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/guix/lint.scm b/guix/lint.scm index a2d6418b85..d2ef4f34b2 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -456,13 +456,23 @@ markup is valid return a plain-text version of SYNOPSIS, otherwise #f." (G_ "Texinfo markup in synopsis is invalid") #:field 'synopsis))))) + (define (check-no-trailing-whitespace synopsis) + "Check that SYNOPSIS doesn't have trailing whitespace." + (if (string-suffix? " " synopsis) + (list + (make-warning package + (G_ "synopsis contains trailing whitespace") + #:field 'synopsis)) + '())) + (define checks (list check-proper-start check-final-period check-start-article check-start-with-package-name check-synopsis-length - check-texinfo-markup)) + check-texinfo-markup + check-no-trailing-whitespace)) (match (package-synopsis package) ("" diff --git a/tests/lint.scm b/tests/lint.scm index d54fafc1d2..dddbf0679f 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -271,6 +271,13 @@ (description "Imagine this is Taylor UUCP.")))) (check-synopsis-style pkg))) +(test-equal "synopsis: contains trailing whitespace" + "synopsis contains trailing whitespace" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (synopsis "Whitespace ")))) + (check-synopsis-style pkg)))) + (test-equal "name: use underscore in package name" "name should use hyphens instead of underscores" (single-lint-warning-message base-commit: cefa260fb42693b87545b1baab8cef9723827f80 -- 2.31.1 From unknown Sun Jun 22 07:40:18 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#48750] [PATCH 2/2] lint: Check for trailing whitespace in description. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 30 May 2021 20:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48750 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48750@debbugs.gnu.org Cc: Xinglu Chen Received: via spool by 48750-submit@debbugs.gnu.org id=B48750.162240666718461 (code B ref 48750); Sun, 30 May 2021 20:32:01 +0000 Received: (at 48750) by debbugs.gnu.org; 30 May 2021 20:31:07 +0000 Received: from localhost ([127.0.0.1]:60443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnS5S-0004nc-L5 for submit@debbugs.gnu.org; Sun, 30 May 2021 16:31:06 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47394 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnS5Q-0004n0-GG for 48750@debbugs.gnu.org; Sun, 30 May 2021 16:31:04 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622406659; bh=a9H0dJGGJRRK8PBVjQO1An2TL4mqZ9LGIrTXFEnLL4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EVLA8Ogc7YX0BS298xjssQYGx2LmWU5RKtjaJVgNgFIxZhe152/XWcrxlYbVFFqx6 XAn/60OySEe73vKq8eOGPGz5wlmUhkumwh9OXrCBKDHeTaaSJEXOyvoU6p55iI9AHv H+bqR+0maCY5CJvh61/dktImH7S3wfpSJ/pmhtRc= Date: Sun, 30 May 2021 22:30:32 +0200 Message-Id: <03b2b2591e76a0bf55419c81c39e8f063b9b1d65.1622406578.git.public@yoctocell.xyz> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 2.9 (++) 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: * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ [...] Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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.9 (+) 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: * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * guix/lint.scm (check-description-style): Check for trailing whitespace. * tests/lint.scm: ("description: trailing whitespace"): New test. --- guix/lint.scm | 10 ++++++++++ tests/lint.scm | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/guix/lint.scm b/guix/lint.scm index d2ef4f34b2..f4b601cf4f 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -278,6 +278,15 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") infractions) #:field 'description))))) + (define (check-no-trailing-whitespace description) + "Check that DESCRIPTION doesn't have trailing whitespace." + (if (string-suffix? " " description) + (list + (make-warning package + (G_ "description contains trailing whitespace") + #:field 'description)) + '())) + (let ((description (package-description package))) (if (string? description) (append @@ -287,6 +296,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) + (check-no-trailing-whitespace description) (match (check-texinfo-markup description) ((and warning (? lint-warning?)) (list warning)) (plain-description diff --git a/tests/lint.scm b/tests/lint.scm index dddbf0679f..25615085df 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -160,6 +160,13 @@ (description "This is a 'quoted' thing.")))) (check-description-style pkg)))) +(test-equal "description: trailing whitespace" + "description contains trailing whitespace" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (description "Whitespace. ")))) + (check-description-style pkg)))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message -- 2.31.1 From unknown Sun Jun 22 07:40:18 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: Xinglu Chen Subject: bug#48750: closed (Re: bug#48750: [PATCH 0/2] Check for trailing whitespace in synopsis and description.) Message-ID: References: <87o8cgdq1m.fsf_-_@gnu.org> X-Gnu-PR-Message: they-closed 48750 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 48750@debbugs.gnu.org Date: Tue, 08 Jun 2021 21:07:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1623186421-25783-1" This is a multi-part message in MIME format... ------------=_1623186421-25783-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #48750: [PATCH 0/2] Check for trailing whitespace in synopsis and descripti= on. 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 48750@debbugs.gnu.org. --=20 48750: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D48750 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1623186421-25783-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 48750-done) by debbugs.gnu.org; 8 Jun 2021 21:06:54 +0000 Received: from localhost ([127.0.0.1]:59879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqiw2-0006hX-An for submit@debbugs.gnu.org; Tue, 08 Jun 2021 17:06:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35202) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqiw1-0006hM-1G for 48750-done@debbugs.gnu.org; Tue, 08 Jun 2021 17:06:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45956) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqivv-0004Gv-B5; Tue, 08 Jun 2021 17:06:47 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36088 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqivu-0005Cg-On; Tue, 08 Jun 2021 17:06:47 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#48750: [PATCH 0/2] Check for trailing whitespace in synopsis and description. References: Date: Tue, 08 Jun 2021 23:06:45 +0200 In-Reply-To: (Xinglu Chen's message of "Sun, 30 May 2021 22:25:18 +0200") Message-ID: <87o8cgdq1m.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 48750-done Cc: 48750-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: -1.3 (-) Hi, Xinglu Chen skribis: > lint: Check for trailing whitespace in synopsis. > lint: Check for trailing whitespace in description. Applied, thanks! =E2=80=98guix lint -c description=E2=80=99 shows there=E2=80=99s a surprisi= ngly large number of synopses/descriptions with trailing white space, so it=E2=80=99s going to be useful. Ludo=E2=80=99. ------------=_1623186421-25783-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 May 2021 19:40:20 +0000 Received: from localhost ([127.0.0.1]:60373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRIK-0003Xq-Hu for submit@debbugs.gnu.org; Sun, 30 May 2021 15:40:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:49140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnRII-0003Xj-TF for submit@debbugs.gnu.org; Sun, 30 May 2021 15:40:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnRII-0001q9-02 for guix-patches@gnu.org; Sun, 30 May 2021 15:40:18 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:37960 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnRIG-0000hy-0C for guix-patches@gnu.org; Sun, 30 May 2021 15:40:17 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1622403610; bh=NUkt561RJsr8yH1y5HMIVoKsKxtrgQSGNZDzt5dkwRM=; h=From:To:Subject:Date; b=iGlF6HQckgoj2fH1OmtWK38LADSR7XAGjBVv1E71/nKLM8GcknI+k+26dZIZtgZjo MP7LhLjGuuXWaijbswm2Yb5QX05whCjifqmeglGPH0gUuUzXOCTkOSbHQUdrrIHpKs cZd8Oq+JbB4DI9vuLwjPkr2XHD5ct3pqtabvbaYw= To: guix-patches@gnu.org Subject: [PATCH 0/2] Check for trailing whitespace in synopsis and description. Message-Id: Date: Sun, 30 May 2021 21:40:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 30 X-Spam_score: 3.0 X-Spam_bar: +++ X-Spam_report: (3.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.602, PDS_OTHER_BAD_TLD=1.997, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 2.7 (++) 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: This patch series adds to checkers that check for trailing whitespace in synopses and descriptions. There is ‘report-trailing-white-space’, but it only checks for trailing whitespace in the file itself, not in the string for the synopsis/description. Content analysis details: (2.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 RCVD_IN_MSPIKE_H4 RBL: Very Good reputation (+4) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 1.6 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: 0.1 (/) This patch series adds to checkers that check for trailing whitespace in synopses and descriptions. There is =E2=80=98report-trailing-white-space=E2=80=99, but it only checks = for trailing whitespace in the file itself, not in the string for the synopsis/description. Xinglu Chen (2): lint: Check for trailing whitespace in synopsis. lint: Check for trailing whitespace in description. guix/lint.scm | 22 +++++++++++++++++++++- tests/lint.scm | 14 ++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) base-commit: cefa260fb42693b87545b1baab8cef9723827f80 --=20 2.31.1 ------------=_1623186421-25783-1--