mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-03 04:45:46 +00:00
check-spacing: rewrite whitespace check before (semi)colon
Instead of matching multiple characters, match any occurrence preceded by a single whitespace and handle the exceptions later.
This commit is contained in:
parent
4e1a7dbb31
commit
b953e163ad
@ -135,10 +135,13 @@ foreach my $file (@ARGV) {
|
|||||||
# errno == EINTR)
|
# errno == EINTR)
|
||||||
# ;
|
# ;
|
||||||
#
|
#
|
||||||
if ($data =~ /[^;\s]\s+[;,]/) {
|
if ($data =~ /\s[;,]/) {
|
||||||
print "Whitespace before (semi)colon:\n";
|
unless ($data =~ /\S; ; / ||
|
||||||
print "$file:$.: $line";
|
$data =~ /^\s+;/) {
|
||||||
$ret = 1;
|
print "Whitespace before (semi)colon:\n";
|
||||||
|
print "$file:$.: $line";
|
||||||
|
$ret = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Require EOL, macro line continuation, or whitespace after ";".
|
# Require EOL, macro line continuation, or whitespace after ";".
|
||||||
|
Loading…
Reference in New Issue
Block a user