Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fe05b6b

Browse files
committed
pgindent: whitelist/blacklist -> additional/excluded.
Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://postgr.es/m/20200615182235.x7lch5n6kcjq4aue%40alap3.anarazel.de
1 parent c0d4f6d commit fe05b6b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/tools/pgindent/pgindent

+8-8
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ $excludes ||= "$code_base/src/tools/pgindent/exclude_file_patterns"
5454
# some names we want to treat like typedefs, e.g. "bool" (which is a macro
5555
# according to <stdbool.h>), and may include some names we don't want
5656
# treated as typedefs, although various headers that some builds include
57-
# might make them so. For the moment we just hardwire a whitelist of names
58-
# to add and a blacklist of names to remove; eventually this may need to be
57+
# might make them so. For the moment we just hardwire a list of names
58+
# to add and a list of names to exclude; eventually this may need to be
5959
# easier to configure. Note that the typedefs need trailing newlines.
60-
my @whitelist = ("bool\n");
60+
my @additional = ("bool\n");
6161

62-
my %blacklist = map { +"$_\n" => 1 } qw(
62+
my %excluded = map { +"$_\n" => 1 } qw(
6363
ANY FD_SET U abs allocfunc boolean date digit ilist interval iterator other
6464
pointer printfunc reference string timestamp type wrap
6565
);
@@ -134,11 +134,11 @@ sub load_typedefs
134134
}
135135
}
136136

137-
# add whitelisted entries
138-
push(@typedefs, @whitelist);
137+
# add additional entries
138+
push(@typedefs, @additional);
139139

140-
# remove blacklisted entries
141-
@typedefs = grep { !$blacklist{$_} } @typedefs;
140+
# remove excluded entries
141+
@typedefs = grep { !$excluded{$_} } @typedefs;
142142

143143
# write filtered typedefs
144144
my $filter_typedefs_fh = new File::Temp(TEMPLATE => "pgtypedefXXXXX");

0 commit comments

Comments
 (0)