diff options
author | Andrew Dunstan | 2010-04-01 14:44:39 +0000 |
---|---|---|
committer | Andrew Dunstan | 2010-04-01 14:44:39 +0000 |
commit | 799c0d3f65082591583086949bba2be159a36e32 (patch) | |
tree | a88e80629a3567498b6fdd6d4814d46b5951de27 | |
parent | 399ea9e7a5dca4a4eee16f8940b969afeeb1ad0f (diff) |
Use a file of patterns of filenames to exclude from pgindent runs, instead if using multiple invocations of egrep. Add perl ppport.h to the current list.
-rw-r--r-- | src/tools/pgindent/README | 10 | ||||
-rw-r--r-- | src/tools/pgindent/exclude_file_patterns | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README index fa77458354..d1719f7e1d 100644 --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -1,4 +1,4 @@ -$PostgreSQL: pgsql/src/tools/pgindent/README,v 1.39 2010/02/26 18:00:15 momjian Exp $ +$PostgreSQL: pgsql/src/tools/pgindent/README,v 1.40 2010/04/01 14:44:39 adunstan Exp $ pgindent ======== @@ -8,7 +8,7 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and 1) Change directory to the top of the build tree. -2) Download the typedef file from the builfarm: +2) Download the typedef file from the buildfarm: wget -O src/tools/pgindent/typedefs.list http://www.pgbuildfarm.org/cgi-bin/typedefs.pl @@ -18,10 +18,8 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and 4) Run pgindent: - find . -name '*.[ch]' -type f -print | - egrep -v '/s_lock.h|/ecpg/test/expected/|/snowball/libstemmer/' | - egrep -v '/ecpg/include/(sqlda|sqltypes)\.h$' | - egrep -v '/ecpg/include/preproc/struct\.h$' | + find . -name '*.[ch]' -type f -print | \ + egrep -v -f src/tools/pgindent/exclude_file_patterns | \ xargs -n100 pgindent src/tools/pgindent/typedefs.list 5) Remove any files that generate errors. diff --git a/src/tools/pgindent/exclude_file_patterns b/src/tools/pgindent/exclude_file_patterns new file mode 100644 index 0000000000..49d61ac163 --- /dev/null +++ b/src/tools/pgindent/exclude_file_patterns @@ -0,0 +1,7 @@ +#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$ |