From a1cbe4b5a944ef1d9e04f11b7d1efcec2a503bc8 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Mon, 20 Jan 2014 12:27:28 +0100 Subject: [PATCH] Make syntax check notice assignments w/o surrounding spaces. --- build-aux/bracket-spacing.pl | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }