From: Thorsten Behrens Date: Mon, 20 Jan 2014 11:27:28 +0000 (+0100) Subject: Make syntax check notice assignments w/o surrounding spaces. X-Git-Tag: v1.2.2-rc1~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1cbe4b5;p=thirdparty%2Flibvirt.git Make syntax check notice assignments w/o surrounding spaces. --- diff --git a/build-aux/bracket-spacing.pl b/build-aux/bracket-spacing.pl index 802a640e4e..4f9f13a686 100755 --- a/build-aux/bracket-spacing.pl +++ b/build-aux/bracket-spacing.pl @@ -144,6 +144,14 @@ foreach my $file (@ARGV) { $ret = 1; last; } + + # Require spaces around assignment '=' and compounds + while ($data =~ /[^!<>&|\-+*\/%\^'= ]=[^=]/ || + $data =~ /[^!<>&|\-+*\/%\^'=]=[^= \\\n]/) { + print "$file:$.: $line"; + $ret = 1; + last; + } } close FILE; }