From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uE0RJU03TmeVYAEAqHPOHw:P1 (envelope-from ) for ; Mon, 02 Dec 2024 22:40:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uE0RJU03TmeVYAEAqHPOHw (envelope-from ) for ; Mon, 02 Dec 2024 23:40:13 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=r295mr94; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1733179213; 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: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=1diCPUwCZMoU7m49flk/0WqGd+oH4fU8dEMy3gkjhQ4=; b=Pa9I0i0En0Z0DLUcZHsEUQj4wkePku4vugb83qq9XFCmuvxxjwC7Uq+lY09+UnfArAZwzt 3PTLLVePDumA4qK72oBX5yD5baHOGmsUjl3lgIJKmJzL27UQQDJ1zyyiMGkUUGP3w2UwU6 T1130mRWESvF2sWdj+cLw7e7z5LTrTn83smuGGVZM5ba9qRR/VCLuERn7e9aai8pX7h49X xTKVtfNX7zx6QVSa2jxPAk/dXDLYt05MvJvvDeiF4um7rFuuwX7e2Qk37f1DNMro3xhvsQ vbIjNh/4fZBHXqILlcp0AyGq20shtx5d5x9XuLD8OmVd+zdXprtxGK/OqSWL8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=r295mr94; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1733179213; a=rsa-sha256; cv=none; b=GlJBtO6lacWHHu6J46Xjj8U0WDXh6bFVT/UCznynlMRPq5cu7dNQVRP8Y1/lqUxr6tVhbK aE3AvnhkQyOwHFTHMSfoVnQd9W+WckM8u3lQSsUoVQOQieS23R4JDAX/25Rrolk/G5PzZ5 BU8PQ7LwMGVrBlb1SrPOaMAEdiWDYHOp2+VNN6zixBHuxLNVrYLN9BOHfTGguUPLRVUVd7 FhqnSjfLMRKpfYPjD3eAzxR9YYHVPgeG78xFhhisj21wUdeHYemoTzEbgr95Tyhxo/WYET iRJVvoVFXfg/fq1qO81oj9GQrawivQnQbDmiOgSx7S2fV9QLL+r58nKkdDo73w== 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 64F90892B3 for ; Mon, 02 Dec 2024 23:40:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIF5I-0007r1-JA; Mon, 02 Dec 2024 17:40:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIF5G-0007pz-Vj for guix-patches@gnu.org; Mon, 02 Dec 2024 17:40:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIF5G-0006cO-N4 for guix-patches@gnu.org; Mon, 02 Dec 2024 17:40:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:From:Date:To:In-Reply-To:References:Subject; bh=1diCPUwCZMoU7m49flk/0WqGd+oH4fU8dEMy3gkjhQ4=; b=r295mr94uwrn/azMCcfvH10aHqyHZas+nN67zQxQOKP45Cl42fXfB/4RCBocB6EZMKZf1rLMhmG0K44zRm/Tuht/jxGBgL3dAOxTJa9g51YKyU4rqRhAa6Cli45hnJCXvO80wDSeXPHwfu7BCG77TRtfdIBtgteawirZejf+gr3bTwx5bysjHAaOfTeJPPESo8QnjNYoG996O9CXn5iJcgFn5B8fojW35N07Rf1cM8d+WezmME73ieMd4eToFrmnz2PYewyMZ/6glbAQEGC6vouLgjE4ggIOkL3oAd8V8ZFZbyr6Rhmj7KtjwzoyCBSWUkCDW8ZvwTAVOQ7jVSk7BQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIF5G-0004A8-Ga for guix-patches@gnu.org; Mon, 02 Dec 2024 17:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74459] [PATCH v2 5/7] guix: lint: Prevent false positives in description typo check. References: In-Reply-To: Resent-From: Gabriel Wicki Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74459 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 74459@debbugs.gnu.org Received: via spool by 74459-submit@debbugs.gnu.org id=B74459.173317914515892 (code B ref 74459); Mon, 02 Dec 2024 22:40:02 +0000 Received: (at 74459) by debbugs.gnu.org; 2 Dec 2024 22:39:05 +0000 Received: from localhost ([127.0.0.1]:56880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF4K-00048G-Pz for submit@debbugs.gnu.org; Mon, 02 Dec 2024 17:39:05 -0500 Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]:52101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIF4I-00047k-UK for 74459@debbugs.gnu.org; Mon, 02 Dec 2024 17:39:03 -0500 Received: from localhost (antispam.ee.ethz.ch [129.132.2.16]) by cotopaxi.ee.ethz.ch (Postfix) with ESMTP id 92C6E1FFFF for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:57 +0100 (CET) X-Virus-Scanned: by amavisd at antispam.ee.ethz.ch Received: from cotopaxi.ee.ethz.ch ([129.132.148.196]) by localhost (antispam.ee.ethz.ch [129.132.2.16]) (amavisd-new, port 10028) with ESMTP id qTJ4_X8kStFs for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:56 +0100 (CET) Received: from blackbox (212-51-128-25.fiber7.init7.net [212.51.128.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gabriel) by cotopaxi.ee.ethz.ch (Postfix) with ESMTPSA for <74459@debbugs.gnu.org>; Mon, 2 Dec 2024 23:38:56 +0100 (CET) Date: Mon, 2 Dec 2024 23:38:51 +0100 From: Gabriel Wicki Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -4.01 X-Spam-Score: -4.01 X-Migadu-Queue-Id: 64F90892B3 X-TUID: WEt+APhf6gSr * guix/lint.scm(check-description-style)[check-description-typo]: Add spaces to match strings to prevent matching false positives, like "allows tokens" or "prevents torpedoes". * tests/lint.scm: Add test. Change-Id: Ifc2ec6167a590b9d2e742dd86fecd798c4bfaa24 --- guix/lint.scm | 4 ++-- tests/lint.scm | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 396ee01fed..ee2059d812 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -507,8 +507,8 @@ (define (check-description-style package) (check-trademarks description) (check-description-typo description '(("This packages" . "This package") ("This modules" . "This module") - ("allows to" . #f) - ("permits to" . #f))) + ("allows to " . #f) + ("permits to " . #f))) ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) diff --git a/tests/lint.scm b/tests/lint.scm index 6631034151..47e31a69bf 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -219,12 +219,18 @@ (define (warning-contains? str warnings) (check-description-style pkg)))) (test-equal "description: grammar 'allows to'" - "description contains typo 'allows to'" + "description contains typo 'allows to '" (single-lint-warning-message (let ((pkg (dummy-package "x" (description "This package allows to do stuff.")))) (check-description-style pkg)))) +(test-equal "description: grammar 'allows to' 2" + '() + (let ((pkg (dummy-package "x" + (description "This package allows tokenization.")))) + (check-description-style pkg))) + (test-equal "synopsis: not a string" "invalid synopsis: #f" (single-lint-warning-message -- 2.46.0