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
pull/200/head
Andrew Dunstan 10 months ago
parent 9d9a71002a
commit 8e4d72573c
  1. 2
      src/tools/pgindent/pgindent

@ -182,7 +182,7 @@ sub process_exclude
while (my $line = <$eh>) while (my $line = <$eh>)
{ {
chomp $line; chomp $line;
next if $line =~ m/^#/; next if $line =~ m/^#/ || $line eq "";
my $rgx = qr!$line!; my $rgx = qr!$line!;
@files = grep { $_ !~ /$rgx/ } @files if $rgx; @files = grep { $_ !~ /$rgx/ } @files if $rgx;
} }

Loading…
Cancel
Save