Skip to content

Commit 4fd8557

Browse files
committed
scripts/buildtable: Check Title length
1 parent 3c42de5 commit 4fd8557

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/buildtable.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
);
8787
my %GrandfatheredPD = map { $_ => undef } qw(9 36 37 38 42 49 50 60 65 67 69 74 80 81 83 90 99 105 107 109 111 112 113 114 122 124 125 126 130 131 132 133 140 141 142 143 144 146 147 150 151 152);
8888
my %TolerateMissingLicense = map { $_ => undef } qw(1 10 11 12 13 14 15 16 21 31 33 34 35 39 43 44 45 47 61 64 68 70 71 72 73 101 102 106 120 121);
89+
my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173);
8990

9091
my %emails;
9192

@@ -120,6 +121,8 @@
120121
die "$fn claims to be BIP $val" if $val ne $bipnum;
121122
} elsif ($field eq 'Title') {
122123
$title = $val;
124+
my $title_len = length($title);
125+
die "$fn has too-long TItle ($title_len > 44 char max)" if $title_len > 44 and not exists $TolerateTitleTooLong{$bipnum};
123126
} elsif ($field eq 'Author') {
124127
$val =~ m/^(\S[^<@>]*\S) \<([^@>]*\@[\w.]+\.\w+)\>$/ or die "Malformed Author line in $fn";
125128
my ($authorname, $authoremail) = ($1, $2);

0 commit comments

Comments
 (0)