Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756978Ab2ECPw7 (ORCPT ); Thu, 3 May 2012 11:52:59 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:53596 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753807Ab2ECPw6 (ORCPT ); Thu, 3 May 2012 11:52:58 -0400 Message-ID: <1336060376.13866.6.camel@joe2Laptop> Subject: Re: [PATCH] checkpatch: add check for whitespace before semicolon at end-of-line From: Joe Perches To: Eric Nelson Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, u-boot@lists.denx.de, rylv50@freescale.com, marex@denx.de, vapier@gentoo.org Date: Thu, 03 May 2012 08:52:56 -0700 In-Reply-To: <4FA28AF4.1000205@boundarydevices.com> References: <1336015938-3174-1-git-send-email-eric.nelson@boundarydevices.com> <1336017507.13866.2.camel@joe2Laptop> <4FA28AF4.1000205@boundarydevices.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.2- Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 597 Lines: 19 On Thu, 2012-05-03 at 06:41 -0700, Eric Nelson wrote: > >> +# check for whitespace before semicolon - not allowed at end-of-line > >> + if ($line =~ /\s+;$/) { > > > > if ($line =~ /\s+;\s*$/) > Won't the extra space at end of line be caught by other tests? Yes it will. You want the test to find the space before semicolon whenever it exists. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/