From 28cea58affb617a63926f33afff34b96f3317678 Mon Sep 17 00:00:00 2001 From: Elvish_Hunter Date: Mon, 25 Dec 2023 21:15:45 +0100 Subject: [PATCH] wmllint: warn about [filter] in [kill] tags --- changelog.md | 1 + data/tools/wmllint | 3 +++ 2 files changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 1ba301d93a3b..9cf205661021 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/data/tools/wmllint b/data/tools/wmllint index 5047fab89771..453e9d6027cf 100755 --- a/data/tools/wmllint +++ b/data/tools/wmllint @@ -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?"