[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44675: guix lint: support for spellchecker or basic grammar
From: |
Ludovic Courtès |
Subject: |
bug#44675: guix lint: support for spellchecker or basic grammar |
Date: |
Tue, 04 May 2021 18:40:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Vagrant,
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.
(Note that ‘string-match’ invokes libc’s regcomp + regexec, so it’s more
heavyweight than needed here.)
Thanks,
Ludo’.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#44675: guix lint: support for spellchecker or basic grammar,
Ludovic Courtès <=