Re: [HACKERS] Running pgindent
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Running pgindent |
Дата | |
Msg-id | 199802250025.TAA26711@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Running pgindent ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>) |
Ответы |
Re: [HACKERS] Running pgindent
|
Список | pgsql-hackers |
> Well, *&^*^#$! I wasted hours cleaning up some of what I considered damage from > the last pass through. > Would it be possible to pass back through (i.e. pipe indent output to a filter) > and fix at least points (1) and (2)? _That_ would be pretty easy to automate > since the heuristics can be pretty simple: > > if (first char is nonwhitespace) && (next word is "*") && (next line starts with > word+paren) > then compress whitespace > > else if (first char is "}") && (next word is "/*") > then compress whitespace > > else > write line as-is > > I'll write the perl if you would be willing to use it? OK, I have changed pgindent to reflect the new structure names, and have made your requested changes. For #1, if the line began with an alpha, and ends with a *, I remove tabs/spaces before the * and make it only one space. Let me know how you like the changes. I have not run it on the source yet because people are still holding patches. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: