zulip/tools/lib
adnrs96 153ad18807 Lint for duplicate ids in templates.
In this commit we enhance our current template linter to detect
duplicate ids and report them during lint checks. html_branches.py
was topped up with a new function build_id_dict for the purpose.

Also the get_tag_info function in same file was updated to parse
ids and classes more robustly in cases of template variables.
split_for_id_and_class function was added to serve this purpose.

Unit tests for both the functions were created under
tests/test_html_branches. Also a directory under tests called
test_template_data was created to hold templates for testing under
newly created functionality.

check_templates was modified to print to console any duplicates
detected.
showell reviewed my commit and helped me out.

Fixes #2950.
2017-01-13 17:00:22 -08:00
..
__init__.py Extract tools/lib/template_parser.py. 2016-08-01 16:27:50 -07:00
css_parser.py pep8: Fix E203 violations 2016-12-01 20:37:57 -08:00
find_add_class.py redesign: Convert subscriptions page to overlay. 2016-12-09 11:08:08 -08:00
html_branches.py Lint for duplicate ids in templates. 2017-01-13 17:00:22 -08:00
html_grep.py Remove extra new lines at the ends of Zulip authoried files. 2016-09-26 21:05:24 -07:00
template_parser.py pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
test_script.py run-dev: Change provisioning error messages to not reference tests. 2016-12-29 16:13:49 -08:00