[PATCH -perfbook 2/4] periodcheck: Add check of '\@.' and '.\@' uses

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

 



"\@." should be at the end of an input line.
".\@" should be in the middle of a line.

Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 utilities/periodcheck.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utilities/periodcheck.pl b/utilities/periodcheck.pl
index b1551c44..11313981 100755
--- a/utilities/periodcheck.pl
+++ b/utilities/periodcheck.pl
@@ -64,6 +64,10 @@ sub check_line {
 		$safe = 1;
 	    }
 	}
+	if ($line =~ /^(?=[\s]*+[^%])[^%]*\.\\\@(\s*$|\s*%.*$)/ ||
+	    $line =~ /^(?=[\s]*+[^%])[^%]*\\\@\.\s+[^\s%]+/){
+	    $safe = 0;
+	}
 	unless ($safe) {
 	    print $ARGV[0], ':', $line_num, ':', $line_raw;
 	}
-- 
2.17.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux