Remove 'for' loop perltidy argument, and move args to perltidyrc file.
authorBruce Momjian <bruce@momjian.us>
Sat, 16 Jun 2012 14:12:50 +0000 (10:12 -0400)
committerBruce Momjian <bruce@momjian.us>
Sat, 16 Jun 2012 14:12:50 +0000 (10:12 -0400)
Backpatch to 9.2.

Per suggestion from Noah Misch

src/tools/pgindent/README
src/tools/pgindent/perltidyrc [new file with mode: 0644]

index 191a8f2122c1067cef13f278a36e80c7ec22c596..fa64390baafc2adf61d0757e36e7ce62e14610a3 100644 (file)
@@ -46,13 +46,8 @@ This can format all PostgreSQL *.c and *.h files, but excludes *.y, and
 
 9) Indent the Perl code:
 
-       find . -name \*.pl -o -name \*.pm | xargs perltidy --noprofile \
-       --backup-and-modify-in-place --opening-brace-on-new-line \
-       --vertical-tightness=2 --vertical-tightness-closing=2 \
-       --nospace-after-keyword=for --nospace-for-semicolon \
-       --add-whitespace --delete-old-whitespace --paren-tightness=2 \
-       --keep-old-blank-lines=2 --maximum-line-length=78 \
-       --entab-leading-whitespace=4 --output-line-ending=unix
+       find . -name \*.pl -o -name \*.pm | 
+       xargs perltidy --profile=src/tools/pgindent/perltidyrc
 
 ---------------------------------------------------------------------------
 
diff --git a/src/tools/pgindent/perltidyrc b/src/tools/pgindent/perltidyrc
new file mode 100644 (file)
index 0000000..60489fe
--- /dev/null
@@ -0,0 +1,12 @@
+--add-whitespace 
+--backup-and-modify-in-place 
+--delete-old-whitespace
+--entab-leading-whitespace=4 
+--keep-old-blank-lines=2 
+--maximum-line-length=78
+--nospace-for-semicolon 
+--opening-brace-on-new-line
+--output-line-ending=unix
+--paren-tightness=2 
+--vertical-tightness=2 
+--vertical-tightness-closing=2