all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: 44675@debbugs.gnu.org
Subject: bug#44675: guix lint: support for spellchecker or basic grammar
Date: Tue, 04 May 2021 18:40:27 +0200	[thread overview]
Message-ID: <87o8dqmozo.fsf@gnu.org> (raw)
In-Reply-To: <87o8e6nqvv.fsf@yucca> (Vagrant Cascadian's message of "Thu, 22 Apr 2021 10:57:56 -0700")

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’.




  parent reply	other threads:[~2021-05-04 16:59 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 [this message]
2021-06-09 15:33         ` Vagrant Cascadian
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

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

  git send-email \
    --in-reply-to=87o8dqmozo.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=44675@debbugs.gnu.org \
    --cc=vagrant@debian.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.