unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 44675@debbugs.gnu.org
Subject: bug#44675: guix lint: support for spellchecker or basic grammar
Date: Wed, 09 Jun 2021 08:33:33 -0700	[thread overview]
Message-ID: <87zgvz129e.fsf@yucca> (raw)
In-Reply-To: <87o8dqmozo.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]

On 2021-05-04, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant@debian.org> skribis:
>
>> From 4e724fbe9815e1c27967b835f08d2259164538ba Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant@debian.org>
>> 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.
>
> I had missed this patch, nice!
>
>> +  (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 'This package'")))
>> +	'()))
>
> How about making this ‘check-spelling’ and generalizing a bit so that it
> iterates over a bunch of regexps or strings?
>
> Like:
>
>     (if (any (cut string-contains description <>) patterns)
>          …)
>
> where ‘patterns’ is a list of strings.

Love the idea, but would need some help in implementing!

There have been at least three newly added "This packages" since I
submitted this patch, so wondering if we can at least get the simple
case merged before getting too caught up in all the potential
improvements?


> (Note that ‘string-match’ invokes libc’s regcomp + regexec, so it’s more
> heavyweight than needed here.)

I can probably manage that! (I'll dig up where the simpler suggestion was)


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2021-06-09 15:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  1:53 bug#44675: guix lint: support for spellchecker or basic grammar Vagrant Cascadian
2020-11-16  5:55 ` zimoun
2021-04-21 23:10 ` Vagrant Cascadian
2021-04-22 16:42   ` Maxime Devos
2021-04-22 17:57     ` Vagrant Cascadian
2021-04-22 18:05       ` Maxime Devos
2021-05-04 16:40       ` Ludovic Courtès
2021-06-09 15:33         ` Vagrant Cascadian [this message]
2021-10-21 23:18           ` Vagrant Cascadian
2021-10-22  8:33             ` zimoun
2021-10-24 11:22               ` Vagrant Cascadian
2021-10-24 11:56                 ` zimoun
2021-10-24 19:02                   ` Vagrant Cascadian
2021-10-24 21:41                     ` Vagrant Cascadian
2021-04-25  7:27   ` Efraim Flashner
2021-04-25 16:43     ` Vagrant Cascadian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgvz129e.fsf@yucca \
    --to=vagrant@debian.org \
    --cc=44675@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).