Commit Graph

8 Commits

Author SHA1 Message Date
Robert Raposa
96fe8afbde Enhance linter for HTML() and Text()
- Add capability to run linter on file or directory
- Add rule for HTML() requiring Text()
- Add rule for HTML() and Text() being closed before format()
- Add rule for Text() unnecessary without HTML()
- Enhance expression parsing
- Add real arg parser for script
- Clean up unit tests
2016-04-11 13:56:35 -04:00
Robert Raposa
a6ac06f210 Remove outdated safe template recommendations
- Remove <%include> linting
- Remove dump_html_escaped_json
2016-04-06 14:57:48 -04:00
Robert Raposa
916723fcaa 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
2016-03-30 14:16:51 -04:00
Robert Raposa
0707e0dd73 Add check for multiple page tags 2016-03-24 16:40:11 -04:00
Eric Fischer
7cfa0fa111 Safe template linter should use DOTALL
MULTILINE has to do with how '^' and '$' behave, DOTALL will make the
'.' match newlines as well. This catches several failures that were
previously missed.
2016-03-23 15:59:29 -04:00
Peter Fogg
6661063b5a Minor fixes to the safe template linter. 2016-03-23 11:38:45 -04:00
Robert Raposa
52efa68b8b Change to output as you go 2016-03-21 22:51:15 -04:00
Robert Raposa
0538dea994 Fix review comments
Changes include:
- Fix code review comments
- Add comments
- Rename variables and files
2016-03-21 22:31:57 -04:00