From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iJKYM654cmFShAEAgWs5BA (envelope-from ) for ; Fri, 22 Oct 2021 10:39:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cO1jL654cmGdXQAAB5/wlQ (envelope-from ) for ; Fri, 22 Oct 2021 08:39:10 +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 575FBE778 for ; Fri, 22 Oct 2021 10:39:10 +0200 (CEST) Received: from localhost ([::1]:54982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdq4z-00085R-JE for larch@yhetil.org; Fri, 22 Oct 2021 04:39:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdq4s-00085F-4k for bug-guix@gnu.org; Fri, 22 Oct 2021 04:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdq4r-0006TA-SL for bug-guix@gnu.org; Fri, 22 Oct 2021 04:39:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mdq4r-0001aM-QH for bug-guix@gnu.org; Fri, 22 Oct 2021 04:39:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44675: guix lint: support for spellchecker or basic grammar Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 22 Oct 2021 08:39:01 +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: Vagrant Cascadian , 44675@debbugs.gnu.org Received: via spool by 44675-submit@debbugs.gnu.org id=B44675.16348919406086 (code B ref 44675); Fri, 22 Oct 2021 08:39:01 +0000 Received: (at 44675) by debbugs.gnu.org; 22 Oct 2021 08:39:00 +0000 Received: from localhost ([127.0.0.1]:59307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdq4p-0001a6-Lu for submit@debbugs.gnu.org; Fri, 22 Oct 2021 04:38:59 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:33379) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mdq4o-0001Zp-1K for 44675@debbugs.gnu.org; Fri, 22 Oct 2021 04:38:58 -0400 Received: by mail-wr1-f42.google.com with SMTP id m22so2922865wrb.0 for <44675@debbugs.gnu.org>; Fri, 22 Oct 2021 01:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=KmUvvfiFXeBkqV2DuOumx/2YQqoXWhuCoZBzvaGK+n4=; b=OEl/9K80w7Cy/nJKuUHn8zTYL23rF8/1tZLgM+JCd4sEpcl1kwwABxZ2FlXIFaGZCW pf3pO/pAtptXhaZ8SA5CZleUQhhxCTG1m+Fbr4KyC3ACNfhxVdDievukxHlva8wqquRP CrXq0hmXvsD8QpACin115Jg7yCSIRoL+nUBPqS5Mulf4bwqpnkgOVxQI/ijJz8pryAlv 59gqQ4I7BdzPvqlNJYb7RWUQZKHVWPKwpaXEoW1YA+XtjHMRR3EOB1eqotWT42GVoXpi K0KluiY3uXiae+X/NFtMlFA1HjdelVN15EYfaZK99vVQuqUnxzt75biMaU4gHjvXih3u yBlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=KmUvvfiFXeBkqV2DuOumx/2YQqoXWhuCoZBzvaGK+n4=; b=Jp6W3ZMDm4YbEbxUm50GZ9l/N+NLf/ZmhI9kF1M+ppRvQ2ABM7qD3+jH1h/zW0bczK Dzzcu6dG7d1qGrXDkVU+Ii3RXgmgfMhEEE5j2cUShyEp9v9F92bij58FE5K+VTfpa5Rc wtH2q22VunZdSbW95ufE7Sg4Ww4ztn1carpRiNlEafNrbh8PodnBrFJBspRT44I8mmXj U8SVRYgAw0Gw7fPq+9u6AUKsUT5mn0q8jTNjQHrwIt0XlCsv6Gwi4/AwpkrtTwkBq1ig 9n89sSvsKFg/V3JZ0Zgs2Mj9m0EB5jPcEiqLMjfwenLRsdUjI4fL+xtftjAuH29R8v8C VeWw== X-Gm-Message-State: AOAM530thl3+FfRwOvBJTdh/PWyXSgSUmy9JNm8VvcwjH9bNUAOSX0iJ 0DKbDO3vLqV9yFJsjK/P/Ox7jvqSLxM= X-Google-Smtp-Source: ABdhPJyPgldB+CHQfbIHuQmf6EanLrUXPzXOoKEuDdMsEIkxEvYiespfJ39xcWf+aKTq22XLMIEy+g== X-Received: by 2002:adf:fccc:: with SMTP id f12mr10164340wrs.208.1634891932251; Fri, 22 Oct 2021 01:38:52 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id j7sm9350602wmq.32.2021.10.22.01.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 01:38:51 -0700 (PDT) From: zimoun In-Reply-To: <8735ouotkl.fsf@yucca> References: <87ima6rrri.fsf@yucca> <87tunznsi7.fsf@yucca> <2f3077c0d040e4b40db19d98195845e124b064d3.camel@telenet.be> <87o8e6nqvv.fsf@yucca> <87o8dqmozo.fsf@gnu.org> <87zgvz129e.fsf@yucca> <8735ouotkl.fsf@yucca> Date: Fri, 22 Oct 2021 10:33:27 +0200 Message-ID: <865ytpzcfc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=1634891950; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=KmUvvfiFXeBkqV2DuOumx/2YQqoXWhuCoZBzvaGK+n4=; b=TEYVLNS/cJmY+XaoGXiNAyPVY5Iosvr1GrWUNVDoO4HDm6yZg8833xlxKfUOKFIVSnOFFb HWBHFopG38cisNvDM4K9rch+8mAI3wlGAnK/jtfriXjeNUKNPNY3ads0k6xiHi3GCnk7qm BIufeQJrXsVVwQpQFAtjCFjjcPqhxwmgui6Ki/AaDzzvSseMmWmJYzOLJVBEJ6BxGLkske fHyPBGHPslnhbSso83pLZxjMek8Lwc8furu+flVizyxmRUE5w0ARkSVpFzDO+B/UHhpHrS IxX2ilAxzcDwGmsvJvlA4J3f32W39WTx5g7F2z4crNOlEUwQBw+NuvulGiV2gQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634891950; a=rsa-sha256; cv=none; b=Y8rxnJUdyjEMyLqEQewa4L3di1a+mXMvkhhcgrLnNDVHYFGtZvfSkHPCaNAIPgKEBhSGWw 5i+Hj+AIjxJr9+omCwyIwi682/JgtFjtqTbt7uSvFeHHsLgEpyBi/lvr/cydj1wR/fI63R zh/Gi4R2+es86cJiCBcnXzUyi34hdsmh9UNXvC06hq0prkqYTJCbSm80AYC7OQnSfMgTzM /9XRpc7euIfaDiGNVSvRU1mCO+Di9qFgrdNdDpVuG9DXrLXzhhDRikjdqmH5/g4+aLl+kl NObOD75YCAjyQ3YMyYcr+vgBoJ8Lj6NVy4yz0RTpZyUeDF78NuENRdnMrUvSoA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="OEl/9K80"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: -1.73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="OEl/9K80"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 575FBE778 X-Spam-Score: -1.73 X-Migadu-Scanner: scn1.migadu.com X-TUID: pvXS6CnYKrMq Hi Vagrant, On Thu, 21 Oct 2021 at 16:18, Vagrant Cascadian wrote: > It has been rewritten to easily add new typo checks, but this one so far > only addresses pluralized "This packages". Would be easy enough to add > "allows to" but hard to add a suggested fix... If I remember correctly the previous discussion, Debian uses an external tool for spellchecking. Here, the patch uses a list of =E2=80=9Ccommon=E2= =80=9D mistakes. It is seems an easy good start. :-) > + (define (check-description-typo description typo correction) Instead, I would use a list of alist =E2=80=99typo-corrections=E2=80=99 as = argument. For instance, --8<---------------cut here---------------start------------->8--- (define (check-description-typo description typo-corrections) (for-each (match-lambda ((typo . correction) (if (string-contains description typo) (list (make-warning ...)) '()))) typo-corrections)) --8<---------------cut here---------------end--------------->8--- > + "Check that DESCRIPTION does not contain typo, with optional > correction" > + (if (string-contains description typo) > + (list > + (make-warning package > + (G_ > + (format #false > + "description contains typo '~a'~@[, shou= ld be '~a'~]" > + typo correction)))) > + '())) > + [...] > + (check-description-typo description "This packages" "This packa= ge") And the call reads, (check-description-typo description '(("This packages" . "This = package"))) which allows easily to add new pattern; such as, '(("This packages" . "This package") ("this packages" . "this package") ("This modules" . "This module")) Then, as a second step, depending on the patterns listed, let see if there is a pattern inside these patterns. ;-) (Check both capitalize and lower-case, etc.) Cheers, simon