pgindent_readme_v3.patch
application/octet-stream
Filename: pgindent_readme_v3.patch
Type: application/octet-stream
Part: 0
Patch
Format: unified
Series: patch v3
| File | + | − |
|---|---|---|
| src/tools/pgindent/README | 20 | 12 |
diff --git a/src/tools/pgindent/README b/src/tools/pgindent/README
index b649a21f59..c63b7cda61 100644
--- a/src/tools/pgindent/README
+++ b/src/tools/pgindent/README
@@ -1,8 +1,9 @@
pgindent'ing the PostgreSQL source tree
=======================================
-We run this process at least once in each development cycle,
-to maintain uniform layout style in our C and Perl code.
+pgindent is used to maintain uniform layout style in our C and Perl code,
+and should be run for every commit. There are additional code beautification
+tasks which should be performed at least once per release cycle.
You might find this blog post interesting:
http://adpgtech.blogspot.com/2015/05/running-pgindent-on-non-core-code-or.html
@@ -29,28 +30,35 @@ DOING THE INDENT RUN:
1) Change directory to the top of the source tree.
-2) Download the latest typedef file from the buildfarm:
-
- wget -O src/tools/pgindent/typedefs.list https://buildfarm.postgresql.org/cgi-bin/typedefs.pl
-
- (See https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list for a full
- list of typedef files, if you want to indent some back branch.)
-
-3) Run pgindent on the C files:
+2) Run pgindent on the C files:
src/tools/pgindent/pgindent .
If any files generate errors, restore their original versions with
"git checkout", and see below for cleanup ideas.
-4) Indent the Perl code using perltidy:
+AT LEAST ONCE PER RELEASE CYCLE:
+
+1) Download the latest typedef file from the buildfarm:
+
+ wget -O src/tools/pgindent/typedefs.list https://buildfarm.postgresql.org/cgi-bin/typedefs.pl
+
+ Standard practice is to manually update this file as needed in the same
+ commit that adds or removes types. This step resolves any differences
+ between the incrementally updated version of the file and a clean,
+ autogenerated one. After doing this and before committing, rerun pgindent.
+
+ (See https://buildfarm.postgresql.org/cgi-bin/typedefs.pl?show_list for a full
+ list of typedef files, if you want to indent some back branch.)
+
+2) Indent the Perl code using perltidy:
src/tools/pgindent/pgperltidy .
If you want to use some perltidy version that's not in your PATH,
first set the PERLTIDY environment variable to point to it.
-5) Reformat the bootstrap catalog data files:
+3) Reformat the bootstrap catalog data files:
./configure # "make" will not work in an unconfigured tree
cd src/include/catalog