From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eGEjK4G6gWAbgAAAgWs5BA (envelope-from ) for ; Thu, 22 Apr 2021 20:03:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uGfXJoG6gWBOFgAAB5/wlQ (envelope-from ) for ; Thu, 22 Apr 2021 18:03:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9CB921E7B2 for ; Thu, 22 Apr 2021 20:03:44 +0200 (CEST) Received: from localhost ([::1]:49114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZdfz-0007Mj-0A for larch@yhetil.org; Thu, 22 Apr 2021 14:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZdbS-0005lZ-KP for bug-guix@gnu.org; Thu, 22 Apr 2021 13:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZdbS-0008BQ-7j for bug-guix@gnu.org; Thu, 22 Apr 2021 13:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZdbS-0007m3-7z for bug-guix@gnu.org; Thu, 22 Apr 2021 13:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44675: guix lint: support for spellchecker or basic grammar Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 22 Apr 2021 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44675 X-GNU-PR-Package: guix X-GNU-PR-Keywords: easy To: Maxime Devos , 44675@debbugs.gnu.org Received: via spool by 44675-submit@debbugs.gnu.org id=B44675.161911430229824 (code B ref 44675); Thu, 22 Apr 2021 17:59:02 +0000 Received: (at 44675) by debbugs.gnu.org; 22 Apr 2021 17:58:22 +0000 Received: from localhost ([127.0.0.1]:35479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZdao-0007ky-3e for submit@debbugs.gnu.org; Thu, 22 Apr 2021 13:58:22 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:49642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZdak-0007ki-4Z for 44675@debbugs.gnu.org; Thu, 22 Apr 2021 13:58:20 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 6B80E1AF0F; Thu, 22 Apr 2021 10:58:11 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <2f3077c0d040e4b40db19d98195845e124b064d3.camel@telenet.be> References: <87ima6rrri.fsf@yucca> <87tunznsi7.fsf@yucca> <2f3077c0d040e4b40db19d98195845e124b064d3.camel@telenet.be> Date: Thu, 22 Apr 2021 10:57:56 -0700 Message-ID: <87o8e6nqvv.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619114624; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=5KfBUOkZRlI3tnhXM4PMHwRI2CHfJ70cLkmcs8Httyg=; b=hnKgbnJSWPAp6PX067tjSVwBZ8Jk+mtgWad5PikxYYtk+iOCTCh8ELyeiAsQ50jLTjTeGL y8CveTlWvsmh9tUXn6FJ6FoXZ1x5bd/itoyV8v/eARAIwkItxUuAvVmizn8h+60X3YI1bp pc2bPCNRKKsbovYCc1TD4/ASYl1zIIElKW7Z+ZMCymC68TydYHUqOoXBwxjEVBofhPePyU s7ev4pmDp5Q6WNZQYFEAolIrImzjXHBy1ZlXpSJh3ztkg2e7j9TzQOqnrmzNNLGasDuzLn kOhpFQ7fEgeWKCvD3ObiS7sBhaWmXDXhrlcMRLxKUxjbrw7VDbyzqIzijw9Hsw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619114624; a=rsa-sha256; cv=none; b=jFCMJg4Dw/CWeQ5XkoGyIcsrooHf7/mXJPNZZ+7TYRjjc8s4rkYrnt9lja+pUfg73n0KTi bWu4CDd4ElpChXyKF6ZcT4IYt3I4NMmLbxQYdkcPKNawOIeaXlLJmBeYtd0mK2At9chxFD E9PtUHn0D4RaeSK0cLe7AUcFflaT4yhScFVVu2w7k/DaMVGOdQ6FTJurkUU9DqN08LISBL royXaXk81wpnH4MjM2g3HM1DLqOtgTimRPQ6zzxY/FESGttTeE/IQM2AVlxstJFW0m0SVO 39tXId20LPbPVEbChpwELHNSpxedev2gv76C0fRqCry+gPkFlAoZo6MuuGyW7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -4.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 9CB921E7B2 X-Spam-Score: -4.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: baE+9qg8Xl3y --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-04-22, Maxime Devos wrote: > + (define (check-pluralized-this-package description) > + "Check that DESCRIPTION does not contain This packages" > > The sentence structure would be clearer if you used quotes here, > something like "Check that DESCRIPTION does not contain =E2=80=98This pac= kages=E2=80=99". Any compelling reason to use =E2=80=98This packages=E2=80=99 vs. 'This pack= ages' ? It seems other quotes in guix/lint.scm use '' also, and I'm not apparently skilled enough with a keyboard to generate =E2=80=98=E2=80=99-style quotes.= .. :) > + (if (string-match "This packages" description) > + (list > + (make-warning package > + (G_ "description contains This Packages but should just be This= package"))) > > There are no package descriptions containing "This Packages". > Did you mean "This packages"? Nice catch, thanks! >> +(test-equal "description: pluralized this package" > Quotes: "description: pluralized =E2=80=98this package=E2=80=99". Noted. >> + "description contains This Packages but should just be This package" > Capitalisation error: This Packages --> This packages > Also, quotes: "description contains =E2=80=98This packages=E2=80=99 but s= hould just be =E2=80=98This package=E2=80=99". Again, nice catch! Updated the commit message and incorporated the above suggestions into the updated attached patch. live well, vagrant --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-lint-Add-description-check-for-pluralized-This-packa.patch Content-Transfer-Encoding: quoted-printable From=204e724fbe9815e1c27967b835f08d2259164538ba Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Wed, 21 Apr 2021 09:26:45 -0700 Subject: [PATCH] lint: Add description check for pluralized "This package" Partial fix for: https://issues.guix.gnu.org/44675 * guix/lint.scm (check-pluralized-this-package): Add check for occurances of "This packages" in package descriptions. * tests/lint.scm: Add test. =2D-- guix/lint.scm | 9 +++++++++ tests/lint.scm | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/guix/lint.scm b/guix/lint.scm index 1bebfe03d3..e00048349b 100644 =2D-- a/guix/lint.scm +++ b/guix/lint.scm @@ -221,6 +221,14 @@ markup is valid return a plain-text version of DESCRIP= TION, otherwise #f." (G_ "Texinfo markup in description is invalid") #:field 'description)))) =20 + (define (check-pluralized-this-package description) + "Check that DESCRIPTION does not contain 'This packages'" + (if (string-match "This packages" description) + (list + (make-warning package + (G_ "description contains 'This packages' but should just be 'Thi= s package'"))) + '())) + (define (check-trademarks description) "Check that DESCRIPTION does not contain '=E2=84=A2' or '=C2=AE' chara= cters. See http://www.gnu.org/prep/standards/html_node/Trademarks.html." @@ -283,6 +291,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") (check-not-empty description) (check-quotes description) (check-trademarks description) + (check-pluralized-this-package description) ;; 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 a2c8665142..3e1b95680a 100644 =2D-- a/tests/lint.scm +++ b/tests/lint.scm @@ -160,6 +160,13 @@ (description "This is a 'quoted' thing.")))) (check-description-style pkg)))) =20 +(test-equal "description: pluralized 'This package'" + "description contains 'This packages' but should just be 'This package'" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (description "This packages is a typo.")))) + (check-description-style pkg)))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message =2D-=20 2.30.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYIG5JAAKCRDcUY/If5cW qkSZAQCLAsyse5gMhpIQdnBHmq2g75AeRUC7sYA+k2X5YS+pZgD+JWMjxaj/9CAn WYlkeiP/Rviat5RG6a63NTlHq96zUQo= =r0Zx -----END PGP SIGNATURE----- --==-=-=--