Allow wide lines if they have svn id tags in them. (This matters for svk: those tags can be *big*.)

svn:r6900
This commit is contained in:
Nick Mathewson 2006-07-25 22:30:50 +00:00
parent d5a2d51c40
commit fc9ed724ed

View file

@ -36,11 +36,11 @@ for $fn (@ARGV) {
$lastnil = 0; $lastnil = 0;
} }
## Terminals are still 80 columns wide in my world. I refuse to ## Terminals are still 80 columns wide in my world. I refuse to
## accept double-line lines. ## accept double-line lines. Except, of course, svn Id tags
if (/^.{80}/) { ## can make us go long.
if (/^.{80}/ && !/\$Id: /) {
print " Wide:$fn:$.\n"; print " Wide:$fn:$.\n";
} }
### Juju to skip over comments and strings, since the tests ### Juju to skip over comments and strings, since the tests
### we're about to do are okay there. ### we're about to do are okay there.
if ($C) { if ($C) {
@ -88,11 +88,10 @@ for $fn (@ARGV) {
} }
} }
## Warn about functions not declared at start of line. ## Warn about functions not declared at start of line.
if ($in_func_head || if ($in_func_head ||
($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
! /^(?:static )?(?:typedef|struct|union)[^\(]*$/ && ! /^(?:static )?(?:typedef|struct|union)[^\(]*$/ &&
! /= *\{$/ && ! /;$/)) { ! /= *\{$/ && ! /;$/)) {
if (/.\{$/){ if (/.\{$/){
print "fn() {:$fn:$.\n"; print "fn() {:$fn:$.\n";
$in_func_head = 0; $in_func_head = 0;