Thread (18 messages) 18 messages, 5 authors, 2020-07-27

Re: [PATCH 0/9] powerpc: delete duplicated words

From: Joe Perches <joe@perches.com>
Date: 2020-07-26 17:49:08
Also in: lkml

On Sun, 2020-07-26 at 10:23 -0700, Randy Dunlap wrote:
On 7/26/20 7:29 AM, Christophe Leroy wrote:
quoted
Randy Dunlap [off-list ref] a écrit :
quoted
Drop duplicated words in arch/powerpc/ header files.
How did you detect them ? Do you have some script for tgat, or you just read all comments ?
Yes, it's a script that finds lots of false positives, so I have to check
each and every one of them for validity.
And it's a lot of work too. (thanks Randy)

It could be something like:

$ grep-2.5.4 -nrP --include=*.[ch] '\b([A-Z]?[a-z]{2,}\b)[ \t]*(?:\n[ \t]*\*[ \t]*|)\1\b' * | \
  grep -vP '\b(?:struct|enum|union)\s+([A-Z]?[a-z]{2,})\s+\*?\s*\1\b' | \
  grep -vP '\blong\s+long\b' | \
  grep -vP '\b([A-Z]?[a-z]{2,})(?:\t+| {2,})\1\b'

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help