wmllint: report stored units never unstored or cleared

Keys from the dictionary of stored units are removed as the unit is
unstored or its variable cleared. However, I found that one character in
Legend of Wesmere, Urudin, is stored but apparently never unstored/cleared.
I figure it's best to report such cases.

This message does not include helpful information like the filename,
because that data was never stored in the dictionary. The dictionary was
designed on the presumption that all entries would have a matching unstore/
clear event, and I didn't think of this warning until I saw there was an
anomalous case. Those who get this error will just have to use grep!
This commit is contained in:
Groggy Dice 2014-01-20 04:19:52 -05:00
parent 2aa6c2477c
commit 3f79e418a5

View file

@ -1785,6 +1785,9 @@ def consistency_check():
if value not in scenario_to_filename:
print '"%s", line %d: unresolved scenario reference %s' % \
(filename, lineno, value)
# Report stored units never unstored or cleared
for store in storedids.keys():
print 'wmllint: stored unit "%s" not unstored or cleared from "%s"' % (storedids[store], store)
# Syntax transformations