Peter Eisentraut <[email protected]> writes:
> A problem I'm having is that if I'm having a build directory inside the 
> source tree
>      meson setup build
> (as is documented) and then run pgindent
>      src/tools/pgindent/pgindent .
> it descends into the build directory and then chokes on various files in 
> there.

Right, we should handle that.

> A subproblem is that if pgindent fails on many files, it doesn't clean 
> up after itself but leaves many pgsrc*.BAK files lying around.  The 
> first patch fixes that.

I object to this patch.  src/tools/pgindent/README documents that
the presence of those files is useful for detecting where pgindent
failed.  Without them there's not an easy signal.

> Then, my first idea was to add an option to pgindent to exclude 
> directories from being processed.  Like
>      src/tools/pgindent/pgindent . --exclude-dir=build
> The second patch implements that.

That seems a bit tedious.

> But then I had the idea that we could recognize build directories 
> automatically by checking what files they contain.  The third patch 
> implements that.  That way, my initial pgindent invocation above works 
> out of the box and I don't have to remember to enumerate the build 
> directories on the command line.

+1 for this one.  I could do without 0002, for myself; what use would
it have once the automatic logic exists?

                        regards, tom lane


Reply via email to