From 9a38b51254b039cc41593bc2e128d7da108031a9 Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Wed, 14 Jun 2017 04:32:13 +0530 Subject: [PATCH] check-templates: Fix filter condition in Jinja2 template linting. In this commit we basically stop ignoring 'base.html' from linting point of view. Basically the condition was implemented in a bad way resulting in ignorance of every template ending with `base.html`. As well since removing it doesn't complain about the base.html non parsable(We have made progress with our linter) we can safely remove the filter condition. --- tools/check-templates | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/check-templates b/tools/check-templates index 2c86a439f8..b8a332a515 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -39,7 +39,6 @@ def check_html_templates(templates, all_dups): # type: (Iterable[str], bool) -> None # Our files with .html extensions are usually for Django, but we also # have a few static .html files. - # The file base.html has a bit of funny HTML that we can't parse here yet. # # We also have .html files that we vendored from Casper. # The casperjs files use HTML5 (whereas Zulip prefers XHTML), and @@ -47,7 +46,7 @@ def check_html_templates(templates, all_dups): # so we exclude them from our linter. logging.basicConfig(format='%(levelname)s:%(message)s') templates = filter( - lambda fn: (('base.html' not in fn) and ('casperjs' not in fn)), + lambda fn: ('casperjs' not in fn), templates) templates = sorted(list(templates)) @@ -106,6 +105,7 @@ def check_html_templates(templates, all_dups): 'templates/zerver/hello.html', 'templates/zerver/home.html', 'templates/zerver/integrations/index.html', + 'templates/zerver/integrations/codebase.html', 'templates/zerver/login.html', 'templates/zerver/markdown_help.html', 'templates/zerver/register.html',