wmllint: recognize [elseif] as a valid child of [if]

This commit is contained in:
Charles Dang 2015-01-17 21:25:38 +11:00
parent 7397bcc30f
commit a1f63dcbe3

View file

@ -1019,7 +1019,7 @@ def local_sanity_check(filename, nav, key, prefix, value, comment):
if (len(ancestors) >= 1 and parent == "[if]") or \
(len(ancestors) >= 2 and parent == "#ifdef" and ancestors[-1] == "[if]"):
if isOpener(nav.element) and nav.element not in ("[and]",
"[else]", "[frame]", "[have_location]",
"[else]", "[elseif]", "[frame]", "[have_location]",
"[have_unit]", "[not]", "[or]", "[then]",
"[variable]") and not nav.element.endswith("_frame]") and not nav.element.startswith("[filter"):
print errlead + 'illegal child of [if]:', nav.element