On 06/21/2011 11:15 PM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net> writes:
>> Attached is a WIP possible replacement for pgindent. Instead of a shell
>> script invoking a mishmash of awk and sed, some of which is pretty
>> impenetrable, it uses a single engine (perl) to do all the pre and post
>> indent processing.
> Hm ... this should offer the chance of running on Windows, but otherwise
> I'm not sure it does very much for us, if you still have to have a
> patched version of NetBSD indent underneath.
Well, to start with it provides a nicer way to invoke pgindent for the
whole repo.
And it will be relatively easy to incorporate new stuff, for example
what Greg Smith was doing in his wrapper script.
It's true that the script contains an unfortunately large number of
workarounds for the limitations and failure modes of the patched bsd
indent we've been using. Some of those are currently working less than
perfectly, and I found it fairly difficult to understand exactly what
they were doing. I hope what I have produced will be a bit clearer and
more maintainable than what it replaces, as well as working a bit better
and more robustly.
>> If anybody is so inclined, this could be used as a basis for removing
>> the use of bsd indent altogether, as has been suggested before, as well
>> as external entab/detab.
> Now *that* I would get excited about. But surely it would be a huge
> amount more work?
>
Yes, which is why I decided to do this - I certainly don't currently
have time to re-implement indent.
cheers
andrew