wmllint: warn about [filter] in [kill] tags

This commit is contained in:
Elvish_Hunter 2023-12-25 21:15:45 +01:00
parent 5cb77700ea
commit 28cea58aff
2 changed files with 4 additions and 0 deletions

View file

@ -13,6 +13,7 @@
### User interface
### WML Engine
### Miscellaneous and Bug Fixes
* wmllint now warns about `[kill]` tags containing `[filter]` tags
## Version 1.17.24
### Campaigns

View file

@ -1393,6 +1393,9 @@ def validate_on_pop(tagstack, closer, filename, lineno):
if closer == "variation" and "variation_id" not in attributes:
print('"%s", line %d: [variation] is missing required variation_id attribute' % \
(filename, lineno))
if closer == "filter" and "kill" in ancestors:
print('"%s", line %d: [kill] should have an inline StandardUnitFilter instead of using [filter]' % \
(filename, lineno))
def within(tag):
"Did the specified tag lead one of our enclosing contexts?"