wmllint: don't warn about [side] without type= if side controller is null

Fixes a few warnings in SotA
This commit is contained in:
Elvish_Hunter 2019-11-18 20:46:34 +01:00
parent 1db9d63435
commit 63c4fa6f66

View file

@ -962,6 +962,7 @@ def validate_on_pop(tagstack, closer, filename, lineno):
# macros.
if "scenario" in ancestors and closer == "side" and "type" not in attributes and \
("no_leader" not in attributes or attributes["no_leader"] != "yes") and \
attributes.get("controller") != "null" and \
"multiplayer" not in ancestors and "leader" not in subtags and attributes:
print('"%s", line %d: [side] without type attribute' % (filename, lineno))
# This assumes that conversion will always happen in units/ files.