[PATCH 1/2] Make syntax check notice assignments w/o surrounding spaces.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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 802a640..fd7438e 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;
 }
-- 
1.8.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]