Skip to content

Commit

Permalink
wmllint: warn about [filter] in [kill] tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvish-Hunter committed Dec 25, 2023
1 parent 5cb7770 commit 28cea58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions data/tools/wmllint
Expand Up @@ -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:

This comment has been minimized.

Copy link
@ProditorMagnus

ProditorMagnus Dec 25, 2023

Contributor

[kill] is just most common of the issues. Would make sense to include all tags with inline SUF here

This comment has been minimized.

Copy link
@ProditorMagnus

ProditorMagnus Dec 25, 2023

Contributor

"kill" in ancestors means [kill][filter_location][filter] is also warning?

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?"
Expand Down

0 comments on commit 28cea58

Please sign in to comment.