diff options
author | Akira Yokosawa <akiyks@gmail.com> | 2022-04-04 09:18:46 +0900 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-04-03 20:33:45 -0700 |
commit | dc03ec5dc877a1d4984431f67b25700c4b16fd6a (patch) | |
tree | c7bad396e1a5a2f77dabf563ebc000a73268cf39 /utilities | |
parent | 9780e7a339dae7939b6212c5112152a51fdc966d (diff) | |
download | perfbook-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-x | utilities/punctcheck.pl | 6 |
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; } |