GNU bug report logs - #44675
guix lint: support for spellchecker or basic grammar

Previous Next

Package: guix;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Mon, 16 Nov 2020 01:55:01 UTC

Severity: normal

Tags: easy

Done: Vagrant Cascadian <vagrant <at> debian.org>

Bug is archived. No further changes may be made.

Full log


Message #34 received at 44675 <at> debbugs.gnu.org (full text, mbox):

From: Vagrant Cascadian <vagrant <at> debian.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Maxime Devos <maximedevos <at> telenet.be>,
 Efraim Flashner <efraim <at> flashner.co.il>, 44675 <at> debbugs.gnu.org
Subject: Re: bug#44675: guix lint: support for spellchecker or basic grammar
Date: Wed, 09 Jun 2021 08:33:33 -0700
[Message part 1 (text/plain, inline)]
On 2021-05-04, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant <at> debian.org> skribis:
>
>> From 4e724fbe9815e1c27967b835f08d2259164538ba Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant <at> 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
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.