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:
parent
2aa6c2477c
commit
3f79e418a5
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue