You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,7 +67,7 @@ export function checkDelegates(contents = fs.readFileSync('./delegates.txt', 'ut
30
67
for(constlineoflines){
31
68
if(line.length===0)continue;
32
69
constmatch=re.exec(line);
33
-
const{ abbr }=match.groups;
70
+
const{ abbr, firstName, lastName}=match.groups;
34
71
35
72
if(previousLine.localeCompare(line,'en')>0){
36
73
thrownewError(`Line ${lineNumber}: Not in lexicographic order.`);
@@ -57,9 +94,45 @@ export function checkDelegates(contents = fs.readFileSync('./delegates.txt', 'ut
57
94
}
58
95
abbrs.set(abbr,lineNumber);
59
96
97
+
constidealTLA=getIdealTLA(firstName,lastName);
98
+
99
+
if(idealTLA){
100
+
if(!allAbbrs.has(idealTLA)&&!NON_IDEAL_ABBRS.has(abbr)&&!TWO_LETTER_ABBRS.has(abbr)){// duplicates the 2-letter check, but helpful to distinguish these issues
101
+
thrownewError(`Line ${lineNumber}: Should be using ideal TLA (${idealTLA}). Note: because code cannot distinguish between a middle name vs a two-part last name, this may be a false positive.`);
0 commit comments