All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -perfbook 0/3] punctcheck.pl updates
@ 2022-04-04  0:00 Akira Yokosawa
  2022-04-04  0:02 ` [PATCH -perfbook 1/3] punctcheck.pl: Add pattern to catch reverse use of period marker Akira Yokosawa
  2022-04-04  0:06 ` [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa
  0 siblings, 2 replies; 3+ messages in thread
From: Akira Yokosawa @ 2022-04-04  0:00 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

Hi Paul,

So, this series adds patterns in punctcheck.pl to detect misuses
of punctuation markers "\@.", ".\@", and its friends.

Patch 1/3 adds the new pattern.
Patch 2/3 adds hint messages to help you and other contributors
see what is wrong.  Hopefully the added messages are clear enough.
Patch 3/3 fixes existing misuses detected by the added pattern.

        Thanks, Akira
--
Akira Yokosawa (3):
  punctcheck.pl: Add pattern to catch reverse use of period markers
  punctcheck.pl: Add hints in complaint messages
  Fix period markers

 glossary.tex            |  2 +-
 memorder/memorder.tex   |  2 +-
 together/applyrcu.tex   |  2 +-
 utilities/punctcheck.pl | 15 +++++++++++++++
 4 files changed, 18 insertions(+), 3 deletions(-)


base-commit: 5f28b7cb0d4c447c9d6397770906c7cb4c96832c
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -perfbook 1/3] punctcheck.pl: Add pattern to catch reverse use of period marker
  2022-04-04  0:00 [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa
@ 2022-04-04  0:02 ` Akira Yokosawa
  2022-04-04  0:06 ` [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa
  1 sibling, 0 replies; 3+ messages in thread
From: Akira Yokosawa @ 2022-04-04  0:02 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook, Akira Yokosawa

End-of-sentence markers ("\@.", "\@?", etc.) make sense when they
follow uppercase letters.
Mid-sentence markers (".\@", "?\@", etc. ) make sense when they
follow lowercase letters.

Add patterns to cache misuses of them.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
---
 utilities/punctcheck.pl | 6 ++++++
 1 file changed, 6 insertions(+)

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;
 	}
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -perfbook 0/3] punctcheck.pl updates
  2022-04-04  0:00 [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa
  2022-04-04  0:02 ` [PATCH -perfbook 1/3] punctcheck.pl: Add pattern to catch reverse use of period marker Akira Yokosawa
@ 2022-04-04  0:06 ` Akira Yokosawa
  1 sibling, 0 replies; 3+ messages in thread
From: Akira Yokosawa @ 2022-04-04  0:06 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: perfbook

On 2022/04/04 9:00, Akira Yokosawa wrote:
> Hi Paul,
> 
> So, this series adds patterns in punctcheck.pl to detect misuses
> of punctuation markers "\@.", ".\@", and its friends.
> 
> Patch 1/3 adds the new pattern.
> Patch 2/3 adds hint messages to help you and other contributors
> see what is wrong.  Hopefully the added messages are clear enough.

I noticed some typos in the added messages just before sending this.
I'll send a v2 soon.

        Thanks, Akira

> Patch 3/3 fixes existing misuses detected by the added pattern.
> 
>         Thanks, Akira
> --
> Akira Yokosawa (3):
>   punctcheck.pl: Add pattern to catch reverse use of period markers
>   punctcheck.pl: Add hints in complaint messages
>   Fix period markers
> 
>  glossary.tex            |  2 +-
>  memorder/memorder.tex   |  2 +-
>  together/applyrcu.tex   |  2 +-
>  utilities/punctcheck.pl | 15 +++++++++++++++
>  4 files changed, 18 insertions(+), 3 deletions(-)
> 
> 
> base-commit: 5f28b7cb0d4c447c9d6397770906c7cb4c96832c

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-04  0:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04  0:00 [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa
2022-04-04  0:02 ` [PATCH -perfbook 1/3] punctcheck.pl: Add pattern to catch reverse use of period marker Akira Yokosawa
2022-04-04  0:06 ` [PATCH -perfbook 0/3] punctcheck.pl updates Akira Yokosawa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.