aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2025-02-20 11:36:07 -0500
committerAndrew Dunstan <andrew@dunslane.net>2025-02-20 11:36:07 -0500
commit8e4d72573cc8b8bdc081661c0a3a76d6573eaa38 (patch)
treedc5e019d2cc60436e9cb497e42188da3bf4bd051
parent9d9a71002a1c1a04005c40d9cd5a6d3db50d32b0 (diff)
downloadpostgresql-8e4d72573cc8b8bdc081661c0a3a76d6573eaa38.tar.gz
postgresql-8e4d72573cc8b8bdc081661c0a3a76d6573eaa38.zip
Ignore blank lines in pgindent exclude files
Currently a blank line matches everything, which is almost never what someone would want. If they really want that they can use a wildcard regex to do it. Author: Zsolt Parragi <zsolt.parragi@percona.com> Discussion: https://postgr.es/m/CAN4CZFNka+2q3=-Dithr4w65RJfwPaV92T62spEzLn+T4MgcMg@mail.gmail.com
-rwxr-xr-xsrc/tools/pgindent/pgindent2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index 7dccf4614aa..54e138b598d 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -182,7 +182,7 @@ sub process_exclude
while (my $line = <$eh>)
{
chomp $line;
- next if $line =~ m/^#/;
+ next if $line =~ m/^#/ || $line eq "";
my $rgx = qr!$line!;
@files = grep { $_ !~ /$rgx/ } @files if $rgx;
}