Skip to content

Commit a221388

Browse files
bors[bot]vext01
andauthored
Merge #71
71: Check years in keys are not in four-digit format. r=ltratt a=vext01 I had planned to check for all keys not matching the format `authorYYtitle`, but there are some keys which have no year or author whatsoever, e.g. ``@misc{tickless,` ...}`. I've fixed the offending keys, but should I bother to go in search of broken consumers? Co-authored-by: Edd Barrett <[email protected]>
2 parents f62d687 + 05c444b commit a221388

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

bin/prebib

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ REGEX_WARNINGS = {
5555
# Authors should just list the title of the conference/workshop.
5656
".*[Pp]roc\.", ".*[Pp]roceedings", ".*[Ww]orkshop"
5757
],
58-
"author" : [".*[Ee]dward [Bb]arrett"] # Prefer "Edd"
58+
"author" : [".*[Ee]dward [Bb]arrett"], # Prefer "Edd"
59+
"id": [r"^\w+\d\d\d\d"], # Years in keys should be in two-digit format.
5960
}
6061

6162
ALWAYS_WARN_IF_MISSING = [ "year", "author", "title" ]
@@ -149,7 +150,8 @@ class PreBib:
149150
return filtered_data
150151

151152
def regex_warn(self, key, data):
152-
""" Warn about common error that can be detected by regex """
153+
""" Warn about common errors that can be detected by regex """
154+
153155
for (f, v) in data.items():
154156
if f == "author": # library splits authors
155157
v = u"and".join([ u" ".join(x) for x in v])

softdev.bib

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ @article{lapaime86logicon
944944
address = {New York, NY, USA},
945945
}
946946

947-
@inproceedings{grimmer2014dynamically,
947+
@inproceedings{grimmer14dynamically,
948948
author = {Mathias Grimmer and Chris Seaton and Thomas W\"urthinger and Hanspeter M\"ossenb\"ock},
949949
title = "Dynamically Composing Languages in a Modular Way: Supporting {C} Extensions for Dynamic Languages",
950950
booktitle = "Modularity",
@@ -1284,7 +1284,7 @@ @misc{qvt05finalspec
12841284
}
12851285
12861286
1287-
@inproceedings{sullivan_dynamic_2001,
1287+
@inproceedings{sullivan01dynamic,
12881288
title = {Dynamic {Partial} {Evaluation}},
12891289
isbn = {3-540-42068-1},
12901290
booktitle = {PADO},
@@ -1606,7 +1606,7 @@ @misc{octane
16061606
author = {Google},
16071607
}
16081608
1609-
@Book{tukey1977exploratory,
1609+
@Book{tukey77exploratory,
16101610
Title = {Exploratory Data Analysis},
16111611
Author = {John Tukey},
16121612
Year = {1977},
@@ -2660,7 +2660,7 @@ @inproceedings{brooks19cheriabi
26602660
pages = 379–393,
26612661
}
26622662
2663-
@inproceedings{xia19cherivoke,
2663+
@inproceedings{xia29cherivoke,
26642664
author = "Xia, Hongyan and Woodruff, Jonathan and Ainsworth, Sam and
26652665
Filardo, Nathaniel W. and Roe, Michael and Richardson, Alexander and
26662666
Rugg, Peter and Neumann, Peter G. and Moore, Simon W. and

0 commit comments

Comments
 (0)