From e2bc4a9de72b0bcab2b1aebeafa52a73412674b7 Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Thu, 20 Feb 2014 02:03:28 -0300 Subject: [PATCH] wmllint: Add check for user-visible [theme]s without a name or description --- data/tools/wmllint | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/tools/wmllint b/data/tools/wmllint index 6b285307e89b..c2d3c19aa33b 100755 --- a/data/tools/wmllint +++ b/data/tools/wmllint @@ -612,6 +612,12 @@ def validate_on_pop(tagstack, closer, filename, lineno): if closer == "theme" and "id" not in attributes: if "name" in attributes: print '"%s", line %d: using [theme]name= instead of [theme]id= is deprecated' % (filename, lineno) + # Check for user-visible themes that lack a UI name or description. + if closer == "theme" and ("hidden" not in attributes or attributes["hidden"] not in ("yes", "true")): + for attr in ("name", "description"): + if attr not in attributes: + print '"%s", line %d: [theme] needs a %s attribute unless hidden=yes' % \ + (filename, lineno, attr) if closer == "filter_side": ancestor = False if "gold" in ancestors: