summaryrefslogtreecommitdiff
path: root/src/test/perl
diff options
context:
space:
mode:
authorAndrew Dunstan2018-05-09 14:14:46 +0000
committerAndrew Dunstan2018-05-09 14:14:46 +0000
commit35361ee78890ce5b559a710c8fa2fdfa843eb280 (patch)
tree22a5a33c4e327f6260f85e1bf36f54759da7f2be /src/test/perl
parent286bb240e1c8e279efa2d805c7f700abfb771925 (diff)
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
Diffstat (limited to 'src/test/perl')
-rw-r--r--src/test/perl/PostgresNode.pm3
-rw-r--r--src/test/perl/TestLib.pm6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 53efb576e03..82a2611a1e9 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -155,7 +155,8 @@ sub new
_host => $pghost,
_basedir => "$TestLib::tmp_check/t_${testname}_${name}_data",
_name => $name,
- _logfile => "$TestLib::log_path/${testname}_${name}.log" };
+ _logfile => "$TestLib::log_path/${testname}_${name}.log"
+ };
bless $self, $class;
mkdir $self->{_basedir}
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index 355ef5fc829..c9f824b4c65 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -256,7 +256,8 @@ sub check_mode_recursive
my $result = 1;
find(
- { follow_fast => 1,
+ {
+ follow_fast => 1,
wanted => sub {
my $file_stat = stat($File::Find::name);
@@ -322,7 +323,8 @@ sub chmod_recursive
my ($dir, $dir_mode, $file_mode) = @_;
find(
- { follow_fast => 1,
+ {
+ follow_fast => 1,
wanted => sub {
my $file_stat = stat($File::Find::name);