summaryrefslogtreecommitdiffstats
path: root/utilities
diff options
context:
space:
mode:
authorAkira Yokosawa <akiyks@gmail.com>2022-04-04 09:18:46 +0900
committerPaul E. McKenney <paulmck@kernel.org>2022-04-03 20:33:45 -0700
commitdc03ec5dc877a1d4984431f67b25700c4b16fd6a (patch)
treec7bad396e1a5a2f77dabf563ebc000a73268cf39 /utilities
parent9780e7a339dae7939b6212c5112152a51fdc966d (diff)
downloadperfbook-dc03ec5dc877a1d4984431f67b25700c4b16fd6a.tar.gz
punctcheck.pl: Add pattern to catch reverse use of period markers
End-of-sentence markers ("\@.") make sense when they follow uppercase letters. Mid-sentence markers (".\@") make sense when they follow lowercase letters. Add patterns to cache reverse uses. Signed-off-by: Akira Yokosawa <akiyks@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'utilities')
-rwxr-xr-xutilities/punctcheck.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/utilities/punctcheck.pl b/utilities/punctcheck.pl
index 7d23cc57..8820bf9c 100755
--- a/utilities/punctcheck.pl
+++ b/utilities/punctcheck.pl
@@ -91,6 +91,12 @@ sub check_line {
if ($line =~ /^(?=[\s]*+[^%])[^%]*\\\@[\.\?\!\:][\)\}\']*\s+[^%]/){
$ng += 1;
}
+ if ($line =~ /[a-z][\)\}\']*\\\@[\.\?\!\:][\)\}\']*\s/) {
+ $ng += 1;
+ }
+ if ($line =~ /[A-Z][\)\}\']*[\.\?\!\:]\\\@[\)\}\']*\s/) {
+ $ng += 1;
+ }
if ($ng) {
print $ARGV[0], ':', $line_num, ':', $line_raw;
}