]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Make syntax check notice assignments w/o surrounding spaces.
authorThorsten Behrens <tbehrens@suse.com>
Mon, 20 Jan 2014 11:27:28 +0000 (12:27 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 20 Jan 2014 13:35:26 +0000 (14:35 +0100)
build-aux/bracket-spacing.pl

index 802a640e4ed9102c5821b640cfcf98a69e1de3ed..4f9f13a6864d728bde7d9c9c7a3d8837cc9c6b21 100755 (executable)
@@ -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;
 }