wmllint: ids in [time_area] are not associated to units most of the time

The exception is when the [time_area] action is part of an event and
it contains an id-based SUF inside an SLF, but that should be rare
enough.
This commit is contained in:
Ignacio R. Morelle 2013-02-19 06:44:24 +00:00
parent 3425fab4c5
commit 05b12ecb69
2 changed files with 4 additions and 2 deletions

View file

@ -90,6 +90,8 @@ Version 1.11.1+svn:
* Made wmllint recognize victory_string, defeat_string,
gold_carryover_string, and notes_string (all from the [objectives] tag) as
attributes that need to be made translatable
* Made wmllint ignore the id attribute in [time_area] as it is not associated
to units most of the time
* Added -Wdocumentation to the CMake pedantic flags.
* Make drakes fly on volcano tiles (bug #20485).
* Added a FOREACH macro to emulate C++11 for(... : ...) style loops.

View file

@ -1249,9 +1249,9 @@ def global_sanity_check(filename, lines):
in_time_area = True
elif "[/time_area]" in lines[i]:
in_time_area = False
elif "[label]" in lines[i] or "[chamber]" in lines[i] or "[time]" in lines[i]:
elif "[label]" in lines[i] or "[chamber]" in lines[i] or "[time]" in lines[i] or "[time_area]" in lines [i]:
ignore_id = True
elif "[/label]" in lines[i] or "[/chamber]" in lines[i] or "[/time]" in lines[i]:
elif "[/label]" in lines[i] or "[/chamber]" in lines[i] or "[/time]" in lines[i] or "[/time_area]" in lines [i]:
ignore_id = False
elif "[kill]" in lines[i] or "[effect]" in lines[i] or "[move_unit_fake]" in lines[i] or "[scroll_to_unit]" in lines[i]:
ignoreable = True