Enhance safe template linter
- Check includes for Mako templates - Check display_name_with_default_escaped uses - Add exceptions for Underscore and <%= - Skip templates that are Django and not Mako - Add pragma to disable errors - Enhance unit tests - Remove violation mako-js-string-missing-quotes - Refactor line processing into StringLines
Showing
- scripts/safe_template_linter.py 493 additions, 188 deletionsscripts/safe_template_linter.py
- scripts/tests/templates/includes/include_safe.html 2 additions, 0 deletionsscripts/tests/templates/includes/include_safe.html
- scripts/tests/templates/includes/include_unsafe.html 1 addition, 0 deletionsscripts/tests/templates/includes/include_unsafe.html
- scripts/tests/templates/test.html 8 additions, 0 deletionsscripts/tests/templates/test.html
- scripts/tests/test_safe_template_linter.py 258 additions, 12 deletionsscripts/tests/test_safe_template_linter.py
Loading
Please register or sign in to comment