Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ff6d4e

Browse files
committed
Adjust pgindent script to use pg_bsd_indent 2.0.
Update version-checking code and list of switches. Delete obsoletequasi-support for using GNU indent. Remove a lot of no-longer-neededworkarounds for bugs of the old version, and improve comments forthe hacks that remain. Update run_build() subroutine to fetch thepg_bsd_indent code from the newly established git repo for it.In passing, fix pgindent to not overwrite files that require no changes;this makes it a bit more friendly to run on a built tree.Adjust relevant documentation.Remove indent.bsd.patch; it's not relevant anymore (and was obsoletelong ago anyway). Likewise remove pgcppindent, since we're no longerin the business of shipping C++ code.Piotr Stefaniak is responsible for most of the algorithmic changesto the pgindent script; I did the rest.Discussion:https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.orgDiscussion:https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
1 parent9ef2dbe commit8ff6d4e

File tree

5 files changed

+52
-448
lines changed

5 files changed

+52
-448
lines changed

‎src/tools/pgindent/README

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ http://adpgtech.blogspot.com/2015/05/running-pgindent-on-non-core-code-or.html
1010

1111
PREREQUISITES:
1212

13-
1) Install pg_bsd_indent in your PATH (see below for details).
13+
1) Install pg_bsd_indent in your PATH. Fetch its source code with
14+
git clone https://git.postgresql.org/git/pg_bsd_indent.git
15+
then follow the directions in README.pg_bsd_indent therein.
1416

1517
2) Install entab (src/tools/entab/).
1618

@@ -57,6 +59,9 @@ VALIDATION:
5759

5860
Your configure switches should include at least --enable-tap-tests
5961
or else much of the Perl code won't get exercised.
62+
The ecpg regression tests may well fail due to pgindent's updates of
63+
header files that get copied into ecpg output; if so, adjust the
64+
expected-files to match.
6065

6166
3) If you have the patience, it's worth eyeballing the "git diff" output
6267
for any egregiously ugly changes. See below for cleanup ideas.
@@ -100,10 +105,10 @@ you're at it.
100105
BSD indent
101106
----------
102107

103-
We have standardized onNetBSD's indent, and renamed it pg_bsd_indent.
104-
We have fixed a few bugs which requre the NetBSD source to be patched
105-
with indent.bsd.patch patch. A fully patched version is available at
106-
https://ftp.postgresql.org/pub/dev.
108+
We have standardized onFreeBSD's indent, and renamed it pg_bsd_indent.
109+
pg_bsd_indent does differ slightly from FreeBSD's version, mostly in
110+
being more easily portable to non-BSD platforms. You can obtain it from
111+
https://git.postgresql.org/git/pg_bsd_indent.git
107112

108113
GNU indent, version 2.2.6, has several problems, and is not recommended.
109114
These bugs become pretty major when you are doing >500k lines of code.
@@ -132,8 +137,10 @@ src/backend/utils/fmgrtab.c is excluded because it confuses pgindent
132137
and it's a derived file anyway.
133138

134139
src/interfaces/ecpg/test/expected/ is excluded to avoid breaking the ecpg
135-
regression tests. Several *.h files are included in regression output so
136-
they must not be changed.
140+
regression tests, since what ecpg generates is not necessarily formatted
141+
as pgindent would do it. (Note that we do not exclude ecpg's header files
142+
from the run; some of them get copied verbatim into ecpg's output, meaning
143+
that the expected files may need to be updated to match.)
137144

138145
src/include/snowball/libstemmer/ and src/backend/snowball/libstemmer/
139146
are excluded because those files are imported from an external project,

‎src/tools/pgindent/indent.bsd.patch

Lines changed: 0 additions & 288 deletions
This file was deleted.

‎src/tools/pgindent/pgcppindent

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp