Skip to content

Commit

Permalink
wmllint: Add check for user-visible [theme]s without a name or descri…
Browse files Browse the repository at this point in the history
…ption
  • Loading branch information
irydacea committed Feb 20, 2014
1 parent d16ec0c commit e2bc4a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/tools/wmllint
Expand Up @@ -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:
Expand Down

0 comments on commit e2bc4a9

Please sign in to comment.