Make wmllint accept all [*_frame] variants, not just a specific subset

This commit is contained in:
Alexander van Gessel 2011-02-10 18:11:55 +01:00
parent cfa2e75665
commit 1958a0c2ba

View file

@ -826,14 +826,9 @@ def local_sanity_check(filename, nav, key, prefix, value, comment):
print errlead + '%s not permitted within [part] tag' % parent
# Most tags are not permitted inside [if]
if len(ancestors) >= 2 and ancestors[-1] == "[if]":
if parent not in ("[and]", "[attack_sound_frame]", "[else]",
"[flame_burst_1_frame]", "[flame_burst_2_frame]",
"[flame_burst_3_frame]", "[flame_burst_4_frame]",
"[flame_burst_5_frame]", "[flame_burst_6_frame]",
"[frame]", "[have_location]", "[have_unit]",
"[missile_frame]", "[not]", "[or]", "[sound_frame]",
"[poisoned_sound_frame]", "[sling_stone_frame]",
"[slowed_sound_frame]", "[then]", "[variable]"):
if parent not in ("[and]", "[else]", "[frame]", "[have_location]",
"[have_unit]", "[not]", "[or]", "[then]",
"[variable]") and not parent.endswith("_frame]"):
print errlead + 'illegal child of [if]'
# Check for fluky credit parts
if parent == "[entry]":