From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] gnu: Remove trademark acknowledgements. Date: Tue, 23 Aug 2016 02:11:14 -0500 Message-ID: <20160823021114.29aab55a@openmailbox.org> References: <1471890295-25249-1-git-send-email-jmd@gnu.org> <20160822182821.GA25307@jocasta.intra> <87k2f8zi35.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/h2B2bNpTfEpUGWtqCkFlY7D" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bc5rx-0006EG-KN for guix-devel@gnu.org; Tue, 23 Aug 2016 03:11:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bc5rq-0000X8-HG for guix-devel@gnu.org; Tue, 23 Aug 2016 03:11:32 -0400 In-Reply-To: <87k2f8zi35.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org, John Darrington --MP_/h2B2bNpTfEpUGWtqCkFlY7D Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 22 Aug 2016 22:03:58 +0200 Ricardo Wurmus wrote: > John Darrington writes: > > > These somehow crept in, but are an explicit violation of GNU policy and > > coding standards. > > Good catch! Thanks for fixing this. > > ~~ Ricardo How about the attached patch to catch such things earlier? `~Eric --MP_/h2B2bNpTfEpUGWtqCkFlY7D Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-guix-lint-Check-descriptions-for-trademark-signs.patch =46rom d68b42ceff1993fa81c36f5187c9cfc12152bc1a Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 23 Aug 2016 02:08:02 -0500 Subject: [PATCH] guix: lint: Check descriptions for trademark signs. To: guix-devel@gnu.org From: Eric Bavier * guix/scripts/lint.scm (check-description-style): Emit a warning if trademark signs found in description. --- guix/scripts/lint.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/guix/scripts/lint.scm b/guix/scripts/lint.scm index 51191e7..98be4d8 100644 --- a/guix/scripts/lint.scm +++ b/guix/scripts/lint.scm @@ -161,6 +161,19 @@ markup is valid return a plain-text version of DESCRIP= TION, otherwise #f." 'description) #f))) =20 + (define (check-trademarks description) + "Check that DESCRIPTION does not contain '=E2=84=A2' or '=C2=AE' chara= cters. See +http://www.gnu.org/prep/standards/html_node/Trademarks.html." + (for-each (lambda (sign) + (match (string-contains description sign) + ((and (? number?) index) + (emit-warning package + (format #f (_ "description should not con= tain ~ +trademark sign '~a' at ~d") + sign index))) + (else #t))) + '("=E2=84=A2" "=C2=AE"))) + (define (check-proper-start description) (unless (or (properly-starts-sentence? description) (string-prefix-ci? (package-name package) description)) @@ -191,6 +204,7 @@ by two spaces; possible infraction~p at ~{~a~^, ~}") (if (string? description) (begin (check-not-empty description) + (check-trademarks description) ;; Use raw description for this because Texinfo rendering ;; automatically fixes end of sentence space. (check-end-of-sentence-space description) --=20 2.9.2 --MP_/h2B2bNpTfEpUGWtqCkFlY7D--