From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CH92NA1TZGMeKAAAbAwnHQ (envelope-from ) for ; Fri, 04 Nov 2022 00:47:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KOVyNA1TZGMbDQEA9RJhRA (envelope-from ) for ; Fri, 04 Nov 2022 00:47:25 +0100 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 3B6952B5E7 for ; Fri, 4 Nov 2022 00:47:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqjuu-0000db-LX; Thu, 03 Nov 2022 19:46:36 -0400 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 1oqjup-0000cx-Px for guix-devel@gnu.org; Thu, 03 Nov 2022 19:46:31 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqjun-0000TW-OU; Thu, 03 Nov 2022 19:46:31 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:20]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 05D281AA68; Thu, 3 Nov 2022 16:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1667519186; bh=FiGqNBpSBqrKX5ntquBwjDq+PDdA0ZzJ+wGG7oPMQTw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QD4NdRtYHjuf9Brv9rJSVar3kuQPZNI+F6n//gZmvx2iuere0IGyNOHAuQ0Kc4gZ+ Piy/fN3W+20EhENRKwdEs0+P72FxQVf14bnHzQC+TgOPxtJfIpf/1/lmXdoO3sK5sW PyTRjRYUaWLCq4wCn/AFs4jkZX8DUbC6EdKKro2i4WRQykzpMgLpPkJDRlByOnE0uY WbaQb7fGCn0lWplDkLnt7S6y7xBlgUwwhfUIsycBcqs9jTbiRWKB1SEewUd3ZpiStT 01iSzCWYjcFGCib0JFbW+i5orTkQ4GSSvtTMkfiuspxAYePfK7A5dW9MuN/MFb5ubR JkaPArDm03K4w== From: Vagrant Cascadian To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Subject: Re: guix lint false positives and RFC patch In-Reply-To: <87tu3goyia.fsf@gnu.org> References: <87leosd8bg.fsf@contorta> <87tu3goyia.fsf@gnu.org> Date: Thu, 03 Nov 2022 16:46:21 -0700 Message-ID: <877d0beh4i.fsf@contorta> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=173.255.214.101; envelope-from=vagrant@debian.org; helo=cascadia.aikidev.net X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.047, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Guix-devel" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667519245; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=icRyQ5hSpEoM9V4QdO5zNrBdrZ7OpIY4UoK2pC6P3IY=; b=iJ9AG9FuN+g1XvVeBAxYRhOqZkveBs5WuIAqdKB+m7ICxHE3Rjl/ctL+nUuapGs+NVvda4 //s/jT3xCdaiH75nxUoD0saWbED0Re+dK31jC4YRvT9veK+TwyqjHUHqPwVGlPri6HufHm ffYQ5sPu9EI5YTr26C/uduh0cTLENWdCuemsFsEbBkG7o6NL3pCKOY3BC29VCNLequxAeR AD6hXVF+wvit29aj7k1xxh7sZejioAUOfcWUs/83o2WHTL7Zlt0J76MWpGGSM60KrgVUIv 6WcZoNMROnoV5MyFpxAe9YQCTyclpGjo/nyBFE3h+uQN8HQcvFSxE4sZMt6tqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667519245; a=rsa-sha256; cv=none; b=GN9RI0+nAa4Uf4PbrMF6gyzQ6uXdCcVPkcyHzrZhS31KRZ4vOLkh5Yp/BWFr1zTivRBoTy SVviatir44H4DDwrDp33CtXyNN8GmpdE9p/veEWWnxmVGV3q7nyoN4D8PyY7vj2CMsCPfy P/TqKC/feIXU9wK8DkcXzNXMnAkaVs8Zwh7vez0ulv+plu7BvSf36WxFYiZcOlv5HngmDo c0WSiu17xxJtMrYGHRL8YN4yzYPH11mw8iQ6bWQZFHRdDx0sSTSlwisznMfOpNLz6NydMT TnUpc20RWvSBjEK9cYWKQ2fa1/6avpWUc81EronkHXRfJ7S82TwkZKSOB+kGOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debian.org header.s=1.vagrant.user header.b=QD4NdRtY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.59 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debian.org header.s=1.vagrant.user header.b=QD4NdRtY; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3B6952B5E7 X-Spam-Score: -5.59 X-Migadu-Scanner: scn1.migadu.com X-TUID: MzTRgKx66hol --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-11-03, Ludovic Court=C3=A8s wrote: > Vagrant Cascadian skribis: > >> --- a/guix/lint.scm >> +++ b/guix/lint.scm >> @@ -313,7 +313,8 @@ (define (tests-explicitly-enabled?) >> '())) >>=20=20 >> (define (properly-starts-sentence? s) >> - (string-match "^[(\"'`[:upper:][:digit:]]" s)) >> + (string-match "^[(\"'`[:upper:][:digit:]]" >> + (string-replace-substring s "@code{" ""))) > > An identifier in @code or file name in @file may legitimately start with > a lower-case letter so I don=E2=80=99t think we should try to prevent tha= t. > > However, maybe we could change the regexp above to something that > accepts @ or some other non-letter character at the start? Great suggestion, as it is simpler, easier to read, and actually covers more false positives! Updated patch attached! I think there was only one case fixed by the @code{} check for the synopsis length check, and I don't see any obvious other @*{} checks that would currently improve anything, though it would be ideal to make it more future-proof just in case... though I think my attempt at that would be awfully ugly, help from others would be welcome! That said, I think this resolves 52 false positives with guix lint (~10% of the 536 synopsis/description issues currently). live well, vagrant --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-guix-lint-Exclude-some-symbols-from-various-checks.patch Content-Transfer-Encoding: quoted-printable From=20d4ddd4a90f18666352b07a4ebe0ed6b79c74f21e Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Wed, 2 Nov 2022 19:56:12 -0700 Subject: [PATCH] guix: lint: Exclude some "@" symbols from various checks. The visual representation of "@code{}" or similar in the description and synopsis do not include the string, so exclude it from checks to avoid false positives. FIXME handle @command, @file, @acronym, etc. * guix/linx.scm (properly-starts-sentence): Exclude leading "@". (check-synopsis-length): Exclude "@code{". =2D-- guix/lint.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index 8e3976171f..26d8f59a2c 100644 =2D-- a/guix/lint.scm +++ b/guix/lint.scm @@ -313,7 +313,7 @@ (define (tests-explicitly-enabled?) '())) =20 (define (properly-starts-sentence? s) =2D (string-match "^[(\"'`[:upper:][:digit:]]" s)) + (string-match "^[@(\"'`[:upper:][:digit:]]" s)) =20 (define (starts-with-abbreviation? s) "Return #t if S starts with what looks like an abbreviation or acronym." @@ -650,7 +650,7 @@ (define check-start-article '())))) =20 (define (check-synopsis-length synopsis) =2D (if (>=3D (string-length synopsis) 80) + (if (>=3D (string-length (string-replace-substring synopsis "@code{" "= ")) 80) (list (make-warning package (G_ "synopsis should be less than 80 characters lon= g") =2D-=20 2.35.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY2RSzgAKCRDcUY/If5cW qrG2AQDAAXYMJFaZjAFOZiGdmLaXcFBbvrUHsMFklIHVxKEouQEAgkhluEdhIHnc YA+iC258pnqs1DNBi/ghkjIq4MUdOgA= =cn61 -----END PGP SIGNATURE----- --==-=-=--