pgsql: Restrict vertical tightness to parentheses in Perl code

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Restrict vertical tightness to parentheses in Perl code
Date: 2018-05-09 14:25:21
Message-ID: E1fGQ1x-0004Il-A0@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Restrict vertical tightness to parentheses in Perl code

The vertical tightness settings collapse vertical whitespace between
opening and closing brackets (parentheses, square brakets and braces).
This can make data structures in particular harder to read, and is not
very consistent with our style in non-Perl code. This patch restricts
that setting to parentheses only, and reformats all the perl code
accordingly. Not applying this to parentheses has some unfortunate
effects, so the consensus is to keep the setting for parentheses and not
for the others.

The diff for this patch does highlight some places where structures
should have trailing commas. They can be added manually, as there is no
automatic tool to do so.

Discussion: https://postgr.es/m/a2f2b87c-56be-c070-bfc0-36288b4b41c1@2ndQuadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/35361ee78890ce5b559a710c8fa2fdfa843eb280

Modified Files
--------------
src/backend/catalog/Catalog.pm | 6 +-
src/backend/utils/Gen_fmgrtab.pl | 6 +-
src/backend/utils/mb/Unicode/UCS_to_BIG5.pl | 6 +-
src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl | 6 +-
.../utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl | 12 +-
src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl | 516 +++++++----
src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl | 18 +-
src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl | 6 +-
src/backend/utils/mb/Unicode/UCS_to_GB18030.pl | 6 +-
src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl | 18 +-
.../utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl | 12 +-
src/backend/utils/mb/Unicode/UCS_to_SJIS.pl | 48 +-
src/backend/utils/mb/Unicode/UCS_to_UHC.pl | 12 +-
src/backend/utils/mb/Unicode/convutils.pm | 27 +-
.../pg_archivecleanup/t/010_pg_archivecleanup.pl | 6 +-
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 54 +-
src/bin/pg_basebackup/t/020_pg_receivewal.pl | 6 +-
src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 18 +-
src/bin/pg_controldata/t/001_pg_controldata.pl | 6 +-
src/bin/pg_ctl/t/001_start_stop.pl | 3 +-
src/bin/pg_dump/t/002_pg_dump.pl | 941 +++++++++++++++------
src/bin/pg_dump/t/010_dump_connstr.pl | 60 +-
src/bin/pg_resetwal/t/002_corrupted.pl | 6 +-
src/bin/pg_rewind/RewindTest.pm | 15 +-
src/bin/pg_rewind/t/003_extrafiles.pl | 3 +-
src/bin/pgbench/t/001_pgbench_with_server.pl | 339 +++++---
src/bin/pgbench/t/002_pgbench_no_server.pl | 205 +++--
src/bin/psql/create_help.pl | 3 +-
src/test/kerberos/t/001_auth.pl | 3 +-
src/test/modules/test_pg_dump/t/001_base.pl | 181 ++--
src/test/perl/PostgresNode.pm | 3 +-
src/test/perl/TestLib.pm | 6 +-
src/test/recovery/t/006_logical_decoding.pl | 6 +-
src/test/recovery/t/011_crash_recovery.pl | 6 +-
src/test/recovery/t/013_crash_restart.pl | 12 +-
src/test/ssl/ServerSetup.pm | 6 +-
src/tools/git_changelog | 6 +-
src/tools/msvc/Install.pm | 9 +-
src/tools/msvc/MSBuildProject.pm | 12 +-
src/tools/msvc/Mkvcbuild.pm | 12 +-
src/tools/msvc/Project.pm | 6 +-
src/tools/msvc/Solution.pm | 3 +-
src/tools/msvc/VCBuildProject.pm | 12 +-
src/tools/pgindent/perltidyrc | 4 +-
src/tools/pgindent/pgindent | 3 +-
src/tools/win32tzlist.pl | 12 +-
46 files changed, 1815 insertions(+), 851 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2018-05-09 14:28:23 pgsql: Fix assorted partition pruning bugs
Previous Message Alvaro Herrera 2018-05-09 13:43:12 pgsql: Make gen_partprune_steps static