zulip/tools
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
..
deprecated Delete deprecated iframe-bot. 2017-01-07 10:53:20 -08:00
documentation_crawler documentation-crawler: Check images in help documentation. 2017-01-12 10:02:32 -08:00
lib Lint for duplicate ids in templates. 2017-01-13 17:00:22 -08:00
print-all lint: Remove old jslint linter. 2016-12-02 18:49:42 -08:00
setup install-aws-server: Add support for installing zulip.conf. 2017-01-06 21:58:16 -08:00
tests Lint for duplicate ids in templates. 2017-01-13 17:00:22 -08:00
travis travis: Prevent upgrading oracle-java9-installer. 2017-01-06 19:30:16 -08:00
zulip-export Simplify, document, and fix the API code. 2016-12-21 11:22:42 -08:00
__init__.py Add __init__.py to tools/ and tools/setup/. 2016-07-20 18:20:37 -07:00
build-api-tarball Always start python via shebang lines. 2016-11-26 14:46:37 -08:00
build-deb Improve shell quoting hygiene 2015-09-25 23:25:08 -04:00
build-release-tarball Move static/third/gemoji to static/generated/emoji. 2016-12-27 20:16:23 -08:00
check-css Add tools/check-css and tools/lib/css_parser.py. 2016-08-02 16:22:46 -07:00
check-provision tests: Add --force option to `tools/test-all` 2017-01-03 11:42:53 -08:00
check-py3 check-py3: Display git status --porcelain output. 2016-05-12 16:30:58 -07:00
check-templates Lint for duplicate ids in templates. 2017-01-13 17:00:22 -08:00
check-urls Django 1.10: Add tool to check urls. 2016-11-10 16:20:04 +05:00
clean-branches Add support for running OpenBSD in development environment. 2016-01-21 22:33:55 -08:00
clean-repo Remove __pycache__ in tools/clean-repo. 2016-05-24 13:43:49 -07:00
clean-venv-cache clean-venv-cache: Fix python 3 compatibility. 2016-06-27 20:39:22 -07:00
compile-handlebars-templates pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
create-test-api-docs pep8: Fix E303 violations. 2016-12-02 15:34:11 -08:00
deploy-branch Improve shell quoting hygiene 2015-09-25 23:25:08 -04:00
deployment-lock-ctl Improve shell quoting hygiene 2015-09-25 23:25:08 -04:00
diagnose dev tools: Diagnose venv problems more clearly. 2017-01-12 13:46:05 -08:00
django-template-graph Add support for running OpenBSD in development environment. 2016-01-21 22:33:55 -08:00
do-destroy-rebuild-database Always start python via shebang lines. 2016-11-26 14:46:37 -08:00
do-destroy-rebuild-test-database Remove extra new lines at the ends of Zulip authoried files. 2016-09-26 21:05:24 -07:00
fetch-rebase-pull-request tools: Improve git scripts. 2016-10-11 13:38:38 -07:00
find-add-class pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
find-unused-css Add hackish tool for finding unused CSS. 2016-04-01 09:34:46 -07:00
get-handlebar-vars Annotate the rest of scripts in tools/. 2016-10-15 22:36:10 -07:00
html-grep pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
install-mypy Move mypy requirements to requirements/ directory. 2016-06-18 16:41:40 -07:00
lint-all lint: Be more permissive with Markdown links. 2017-01-12 16:42:51 -08:00
lister.py pep8: Fix E225 pep8 violations. 2016-11-28 15:21:15 -08:00
minify-js minify-js: Auto-detect virtualenv when possible. 2017-01-06 19:55:08 -08:00
munge_postgres_logs.pl Make munge_postgres_logs.pl executable 2013-01-29 12:16:32 -05:00
pre-commit pre-commit: Call lint-all with --force. 2016-11-26 12:30:16 -08:00
provision.py Add virtualenv activation in .zprofile. 2017-01-13 15:13:44 -08:00
replace-tarball-shebang build-release-tarball: Add --py3 option for python3 shebang lines. 2016-11-29 17:45:18 -08:00
reset-to-pull-request tools: Improve git scripts. 2016-10-11 13:38:38 -07:00
review Add tools/review for reviewing PRs. 2017-01-12 15:26:40 -08:00
run-dev-queue-processors Always start python via shebang lines. 2016-11-26 14:46:37 -08:00
run-dev.py run-dev: Change provisioning error messages to not reference tests. 2016-12-29 16:13:49 -08:00
run-graphiti [manual] Rename /home/humbug to /home/zulip. 2013-10-08 08:57:29 -04:00
run-mypy Delete remains of deprecated inject-messages. 2017-01-07 10:53:20 -08:00
send_github_payloads.py Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
setup-git-repo Remove git commit domain restrictions. 2015-08-19 21:40:04 -07:00
show-profile-results.py tools: Fix bare except clause. 2017-01-08 16:22:21 -08:00
start-dockers Move docker development environment scripts to tools/. 2016-06-27 13:38:06 -07:00
test-all tests: Add --force option to `tools/test-all` 2017-01-03 11:42:53 -08:00
test-all-docker Move docker development environment scripts to tools/. 2016-06-27 13:38:06 -07:00
test-backend pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
test-documentation test-documentation: Add pretty success/failure output. 2016-10-25 11:41:12 -07:00
test-help-documentation.py tools: Fix bare except clause. 2017-01-08 16:22:21 -08:00
test-js-with-casper casper: Rename frontend_tests/run to clarify it uses casper. 2015-10-28 10:11:47 -07:00
test-js-with-node provision: Use NVM to install node and npm. 2016-09-23 14:34:44 -07:00
test-management Add new test for management commands running with --help. 2015-11-11 21:34:39 -08:00
test-migrations test-migrations: Fix missing exit status on error. 2016-06-15 09:26:04 -07:00
test-queue-worker-reload Fixed typos in test-queue-worker-reload 2017-01-12 04:51:27 -08:00
test-run-dev Always start python via shebang lines. 2016-11-26 14:46:37 -08:00
test-tools pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
test_user_agent_parsing.py Change shebangs from python2.7 to python. 2016-05-29 05:03:08 -07:00
update-prod-static update-prod-static: Fix node_modules/.bin being unavailable in prod. 2017-01-06 20:23:46 -08:00
user_agents_unique Kill Embed.ly integration. 2015-08-20 19:46:48 -07:00
webpack pep8: Fix E128 violations. 2016-12-13 10:50:14 -08:00
webpack.config.js dev-proxy-logging: Add client ip transference to proxy server. 2016-12-21 17:18:02 +06:00
webpack.production.config.js eslint: Fix comma-dangle rules in JS support files. 2016-12-03 15:00:24 -08:00
zanitizer zanitizer: Remove -- argument that confuses some Git verisons 2015-09-25 00:46:00 -07:00
zanitizer_config.pm.sample zanitizer: Support renaming files 2015-09-24 18:10:02 -07:00