Re: remove duplicated words in comments .. across lines
Вложения
В списке pgsql-hackers по дате отправления:
| От | Michael Paquier |
|---|---|
| Тема | Re: remove duplicated words in comments .. across lines |
| Дата | |
| Msg-id | 20180908192529.GG32058@paquier.xyz обсуждение исходный текст |
| Ответ на | remove duplicated words in comments .. across lines (Justin Pryzby <pryzby@telsasoft.com>) |
| Список | pgsql-hackers |
On Fri, Sep 07, 2018 at 08:31:09PM -0500, Justin Pryzby wrote:
> Resending to -hackers as I realized this isn't a documentation issue so not
> appropriate or apparently interesting to readers of -doc.
>
> I should probably just call the algorithm proprietary, but if you
> really wanted to know, I've suffered again through sed's
> black/slashes.
>
> [...]
>
> Alternately:
> time for f in `find . -name '*.c' -o -name '*.h'`; do x=`<"$f" sed -rn
> '/\/\*/!d; :l; /\*\//!{N; b l}; s/\n[[:space:]]*\*/\n/g;
> /(\<[[:alpha:]]{1,})\>\n[[:space:]]*\<\1\>/!d; s//>>&<</; p'`; [ -n
> "$x" ] && echo "$f:" && echo "$x"; done |less
This generates a lot of false positives, like "that that" which is
grammatically fine. And fails to ignore entries separated by multiple
lines, but the concept is cool. Respect for building that.
I looked at what the command above produces, and it seems to me that you
have spotted all the spots which are problematic, so committed after
applying a proper indentation, which was incorrect in two places.
--
Michael
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера