From: Andrew Dunstan Date: Thu, 20 Feb 2025 16:36:07 +0000 (-0500) Subject: Ignore blank lines in pgindent exclude files X-Git-Tag: REL_18_BETA1~818 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=8e4d72573cc8b8bdc081661c0a3a76d6573eaa38;p=postgresql.git 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 Discussion: https://postgr.es/m/CAN4CZFNka+2q3=-Dithr4w65RJfwPaV92T62spEzLn+T4MgcMg@mail.gmail.com --- 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; }