Re: remove duplicated words in comments .. across lines

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Re: RULE does not like the NOT EXISTS condition
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Prevent concurrent DROP SCHEMA when certain objects are beinginitially created in the namespace