From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbbEGUfW (ORCPT ); Thu, 7 May 2015 16:35:22 -0400 Received: from smtprelay0149.hostedemail.com ([216.40.44.149]:49368 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751353AbbEGUfT (ORCPT ); Thu, 7 May 2015 16:35:19 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3351:3622:3865:3866:3868:3870:3871:3872:3873:3874:4321:5007:6261:7903:10004:10400:10848:11658:11914:12043:12517:12519:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: bikes29_8589ca1990652 X-Filterd-Recvd-Size: 1565 Message-ID: <1431030916.18597.40.camel@perches.com> Subject: Re: [patch] checkpatch: complain about GW-BASIC style label names From: Joe Perches To: Dan Carpenter Cc: Andy Whitcroft , linux-kernel@vger.kernel.org Date: Thu, 07 May 2015 13:35:16 -0700 In-Reply-To: <1431029858.18597.35.camel@perches.com> References: <20150507112111.GA21498@mwanda> <1431006471.9365.124.camel@perches.com> <20150507194232.GA16501@mwanda> <1431029858.18597.35.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-05-07 at 13:17 -0700, Joe Perches wrote: > # check for label names likely used in a numeric sequence of labels > if ($line =~ /^.\s*((?:err|error|fail|out)[0-9+])\s*:/i || > $line =~ /\bgoto\s+((?:err|error|fail|out)[0-9+])\s*[:;,]/) { Meh. I told you about my perl-fu... That + should be outside the close bracket and it's probably better that this use a funny (?i) use inside the capture group so that the goto is lower case only, but the label can be lower, upper and mixed case. if ($line =~ /^.\s*((?i)(?:err|error|fail|out)[0-9]+)\s*:/ || $line =~ /\bgoto\s+((?i)(?:err|error|fail|out)[0-9]+)\s*[:;,]/) {