Thread: pgindent excluded files list

pgindent excluded files list

From
Andrew Dunstan
Date:
I propose that we create a file containing the list of patterns to 
exclude from pgindent runs. It would look like this:
   #list of file patterns to exclude from pg_indent runs   /s_lock\.h$   /ecpg/test/expected/   /snowball/libstemmer/
/ecpg/include/(sqlda|sqltypes)\.h$  /ecpg/include/preproc/struct\.h$   /pl/plperl/ppport\.h$
 


Then a pgindent run would look like this:
   find . -name '*.[ch]' -type f -print | \   egrep -v -f src/tools/pgindent/exclude_files | \   xargs -n100 pgindent
src/tools/pgindent/typedefs.list    
 

which is shorter and more efficient and less error prone than the way it's done in the current instructions (which puts
thepatterns to be excluded in a series of egrep pipes).
 

Thoughts?

cheers

andrew



Re: pgindent excluded files list

From
David Fetter
Date:
On Wed, Mar 31, 2010 at 10:27:03AM -0400, Andrew Dunstan wrote:
> 
> I propose that we create a file containing the list of patterns to
> exclude from pgindent runs. It would look like this:
> 
>    #list of file patterns to exclude from pg_indent runs
>    /s_lock\.h$
>    /ecpg/test/expected/
>    /snowball/libstemmer/
>    /ecpg/include/(sqlda|sqltypes)\.h$
>    /ecpg/include/preproc/struct\.h$
>    /pl/plperl/ppport\.h$
> 
> 
> Then a pgindent run would look like this:
> 
>    find . -name '*.[ch]' -type f -print | \
>    egrep -v -f src/tools/pgindent/exclude_files | \
>    xargs -n100 pgindent src/tools/pgindent/typedefs.list
> 
> which is shorter and more efficient and less error prone than the
> way it's done in the current instructions (which puts the patterns
> to be excluded in a series of egrep pipes).
> 
> Thoughts?

+1 for simplifying and consolidating.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: pgindent excluded files list

From
Bruce Momjian
Date:
Andrew Dunstan wrote:
> 
> I propose that we create a file containing the list of patterns to 
> exclude from pgindent runs. It would look like this:
> 
>     #list of file patterns to exclude from pg_indent runs
>     /s_lock\.h$
>     /ecpg/test/expected/
>     /snowball/libstemmer/
>     /ecpg/include/(sqlda|sqltypes)\.h$
>     /ecpg/include/preproc/struct\.h$
>     /pl/plperl/ppport\.h$
> 
> 
> Then a pgindent run would look like this:
> 
>     find . -name '*.[ch]' -type f -print | \
>     egrep -v -f src/tools/pgindent/exclude_files | \
>     xargs -n100 pgindent src/tools/pgindent/typedefs.list
>       
> 
> which is shorter and more efficient and less error prone than the way it's done in the current instructions (which
putsthe patterns to be excluded in a series of egrep pipes).
 

Great, just update the pgindent README.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com