login
Login
/
Register
Search
Header Space
Forums
News
Jobs
Blogs
Features
Man Pages
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
March
»
5
Re: [PATCH] checkpatch: take 2 - Make some text more consinstent and informative
view
thread
Score:
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Roel Kluin <12o3l@...>
To: Paolo Ciarrocchi <paolo.ciarrocchi@...>
Cc: <linux-kernel@...>, <apw@...>
Subject:
Re: [PATCH] checkpatch: take 2 - Make some text more consinstent and informative
Date: Wednesday, March 5, 2008 - 5:23 pm
Paolo Ciarrocchi wrote:
quoted text
> Hi Andy, > Now messages about missing spaces or not needed spaces are in the format: > space is required > space is not required > > New in v2: > Fix some spelling mistakes noted by Joe Perches. > > Signed-off-by: unknown <PCIARRO@.omnitel.it> > --- > checkpatch.pl | 30 +++++++++++++++--------------- > 1 files changed, 15 insertions(+), 15 deletions(-) > > diff --git a/checkpatch.pl b/checkpatch.pl > index 2a7cef9..ba9fbe6 100755 > --- a/checkpatch.pl > +++ b/checkpatch.pl > @@ -1005,7 +1005,7 @@ sub process { > $herecurr); > } > if ($line =~ /^\s*signed-off-by:\S/i) { > - WARN("need space after Signed-off-by:\n" . > + WARN("space is required after Signed-off-by:\n" . > $herecurr); > } > } > @@ -1340,7 +1340,7 @@ sub process { > } elsif ("$ctx$name" =~ /$Type$/) { > > } else { > - WARN("no space between function name and open > parenthesis '('\n" . $herecurr); > + WARN("space is not required between function name and > open parenthesis '('\n" . $herecurr); > } > } > # Check operator spacing. > @@ -1424,7 +1424,7 @@ sub process { > } elsif ($op eq ';') { > if ($ctx !~ /.x[WEBC]/ && > $cc !~ /^\/ && $cc !~ /^;/) { > - ERROR("need space after that '$op' $at\n" . > $hereptr); > + ERROR("space is required after that '$op' > $at\n" . $hereptr); > } > > # // is a comment > @@ -1433,13 +1433,13 @@ sub process { > # -> should have no spaces > } elsif ($op eq '->') { > if ($ctx =~ /Wx.|.xW/) { > - ERROR("no spaces around that '$op' $at\n" . > $hereptr); > + ERROR("space are not required around that '$op'
"spaces are" or "space is"
quoted text
> $at\n" . $hereptr); > } > > # , must have a space on the right. > } elsif ($op eq ',') { > if ($ctx !~ /.x[WEC]/ && $cc !~ /^}/) { > - ERROR("need space after that '$op' $at\n" . > $hereptr); > + ERROR("space is required after that '$op' > $at\n" . $hereptr); > } > > # '*' as part of a type definition -- reported already. > @@ -1452,10 +1452,10 @@ sub process { > } elsif ($op eq '!' || $op eq '~' || > ($is_unary && ($op eq '*' || $op eq '-' || $op > eq '&'))) { > if ($ctx !~ /[WEBC]x./ && $ca !~ > /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { > - ERROR("need space before that '$op' $at\n" . > $hereptr); > + ERROR("space is required before that '$op' > $at\n" . $hereptr); > } > if ($ctx =~ /.xW/) { > - ERROR("no space after that '$op' $at\n" . > $hereptr); > + ERROR("space is not required after that '$op' > $at\n" . $hereptr); > } > > # unary ++ and unary -- are allowed no space on one side. > @@ -1464,7 +1464,7 @@ sub process { > ERROR("need space one side of that '$op' $at\n" > . $hereptr); > } > if ($ctx =~ /WxB/ || ($ctx =~ /Wx./ && $cc =~ /^;/)) { > - ERROR("no space before that '$op' $at\n" . > $hereptr); > + ERROR("space is not required before that '$op' > $at\n" . $hereptr); > } > > # << and >> may either have or not have spaces both sides > @@ -1514,31 +1514,31 @@ sub process { > #need space before brace following if, while, etc > if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || > $line =~ /do{/) { > - ERROR("need a space before the open brace '{'\n" . $herecurr); > + ERROR("space is required before the open brace '{'\n" . > $herecurr); > } > > # closing brace should have a space following it when it has anything > # on the line > if ($line =~ /}(?!(?:,|;|\)))\S/) { > - ERROR("need a space after that close brace '}'\n" . > $herecurr); > + ERROR("space is required after that close brace '}'\n" . > $herecurr); > } > > # check spacing on square brackets > if ($line =~ /\[\s/ && $line !~ /\[\s*$/) { > - ERROR("no space after that open square bracket '['\n" . > $herecurr); > + ERROR("space is not required after that open square bracket > '['\n" . $herecurr); > } > if ($line =~ /\s\]/) { > - ERROR("no space before that close square bracket ']'\n" . > $herecurr); > + ERROR("space is not required before that close square > bracket ']'\n" . $herecurr); > } > > # check spacing on paretheses > if ($line =~ /\(\s/ && $line !~ /\(\s*(?:\)?$/ && > $line !~ /for\s*\(\s+;/) { > - ERROR("no space after that open parenthesis '('\n" . > $herecurr); > + ERROR("space is not required after that open parenthesis > '('\n" . $herecurr); > } > if ($line =~ /(\s+)\)/ && $line !~ /^.\s*\)/ && > $line !~ /for\s*\(.*;\s+\)/) { > - ERROR("no space before that close parenthesis ')'\n" . > $herecurr); > + ERROR("space is not required before that close parenthesis > ')'\n" . $herecurr); > } > > #goto labels aren't indented, allow a single space however > @@ -1549,7 +1549,7 @@ sub process { > > # Need a space before open parenthesis after if, while etc > if ($line=~/\b(if|while|for|switch)\(/) { > - ERROR("need a space before the open parenthesis '('\n" . > $herecurr); > + ERROR("space is required before the open parenthesis '('\n" > . $herecurr); > } > > # Check for illegal assignment in if conditional.
--
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] checkpatch: take 2 - Make some text more consinstent...
, Paolo Ciarrocchi
, (Wed Mar 5, 5:10 pm)
Re: [PATCH] checkpatch: take 2 - Make some text more consins...
, Roel Kluin
, (Wed Mar 5, 5:23 pm)
Re: [PATCH] checkpatch: take 2 - Make some text more consins...
, Paolo Ciarrocchi
, (Wed Mar 5, 5:35 pm)
Navigation
Create content
Mailing list archives
Recent posts
Mail archive search
Enter your search terms.
all mailing lists
alsa-devel
dragonflybsd-bugs
dragonflybsd-commit
dragonflybsd-docs
dragonflybsd-kernel
dragonflybsd-submit
dragonflybsd-user
freebsd-announce
freebsd-bugs
freebsd-chat
freebsd-cluster
freebsd-current
freebsd-drivers
freebsd-embeded
freebsd-fs
freebsd-hackers
freebsd-hardware
freebsd-mobile
freebsd-net
freebsd-performance
freebsd-pf
freebsd-security
freebsd-security-notifications
freebsd-threads
git
git-commits-head
linux-activists
linux-arm
linux-ath5k-devel
linux-btrfs
linux-c-programming
linux-driver-devel
linux-ext4
linux-fsdevel
linux-ia64
linux-input
linux-kernel
linux-kernel-janitors
linux-kernel-mentors
linux-kernel-newbies
linux-kvm
linux-net
linux-netdev
linux-newbie
linux-nfs
linux-raid
linux-scsi
linux-security-module
linux-sparse
linux-usb
linux-usb-devel
madwifi-devel
netbsd-announce
netbsd-tech-kern
openbsd-announce
openbsd-bugs
openbsd-ipv6
openbsd-misc
openbsd-security-announce
openbsd-smp
openbsd-source-changes
openbsd-tech
openfabrics-general
openmoko-community
openmoko-devel
openmoko-kernel
reiserfs-devel
tux3
ucarp
Optionally limit your search to a specific mailing list.
advanced
Popular discussions
linux-kernel
:
Ryan Hope
reiser4 for 2.6.27-rc1
hooanon05
[PATCH 63/67] aufs mount helper
Rafael J. Wysocki
2.6.26-rc9-git12: Reported regressions from 2.6.25
Peter Zijlstra
Re: [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released
git
:
Ken Pratt
pack operation is thrashing my server
しらいしななこ
[PATCH] Update Japanese translation
Christian Couder
[PATCH] Documentation: help: explain 'man.viewer' multiple values
Dennis Schridde
Odd number of elements in anonymous hash
openbsd-misc
:
GVG GVG
ssh_exchange_identification: Connection closed by remote host
Chris
avoid logging useless ssh brute force attempts
Ray Percival
Re: Real men don't attack straw men
Marius ROMAN
1440x900 resolution problem
linux-activists
:
Jim Winstead Jr.
Re: Root Disk/Book Disk Compatibility
Doug Evans
Re: Stabilizing Linux
Stephen Pierce
SLS
Mark Evans
Re: Possible bug in TCP/IP stuff of kernel (0.99p5 on up).
Latest forum posts
trouble with my Asus Mainboard
3 hours ago
Linux kernel
what is "callback function"?.can anyone explain me please..
1 day ago
Linux general
unable to remove block device driver module
1 day ago
Linux kernel
Is there anything like Real-time drivers?
2 days ago
Linux general
I can't allocate more than 4 MB with pci_alloc_consistent
2 days ago
Linux kernel
Resetting the bios password for Toshiba Laptop
2 days ago
Hardware
Kernel panic while installing fedora core 5 or ubuntu
3 days ago
Hardware
Interactive Linux kernel map
3 days ago
Linux kernel
unable to add a variable in buffer_head struct
3 days ago
Linux kernel
Linux Input driver - setting scaling/resolution on USB mouse
4 days ago
Linux kernel
Show all forums...
Recent Tags
git
Andrew Morton
Junio Hamano
2.6.27
squashfs
GCC
Rik van Riel
filesystem
cramfs
git 1.6.0
Linus Torvalds
Linux
Ingo Molnar
-rc
performance
release
AXFS
Jared Hulbert
git 1.6
quote
more tags
Colocation donated by:
Who's online
There are currently
6 users
and
839 guests
online.
Online users
mmessano
Jeremy
espenfjo
gmicsko
strcmp
Mr_Z
Syndicate
speck-geostationary