From 5d0284a5137642802119260e2eafcc5098363cf8 Mon Sep 17 00:00:00 2001 From: Anonymissimus Date: Tue, 14 Feb 2012 21:25:33 +0000 Subject: [PATCH] wmllint rule for the 2 deprecations in my latest revisions No changes to mainline needed. These were only valid for almost one year however. --- data/tools/wmllint | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/data/tools/wmllint b/data/tools/wmllint index 959976ba075..13d455ff0a2 100755 --- a/data/tools/wmllint +++ b/data/tools/wmllint @@ -547,6 +547,15 @@ def validate_on_pop(tagstack, closer, filename, lineno): if closer == "unit" and attributes.get("id") is not None and attributes.get("type") is not None and attributes.get("side") is None and not "side" in ancestors: print '"%s", line %d: unit declaration without side attribute' % \ (filename, lineno) + if closer == "filter_side": + ancestor = False + if "gold" in ancestors: + ancestor = "gold" + elif "modify_ai" in ancestors: + ancestor = "modify_ai" + if ancestor: + print '"%s", line %d: %s should have an inline SSF instead of using [filter_side]' % \ + (filename, lineno, ancestor) def within(tag): "Did the specified tag lead one of our enclosing contexts?"