Commit Graph

9 Commits

Author SHA1 Message Date
Robert Raposa
b5a674d941 Fix parsing defect 2016-04-12 15:20:24 -04:00
Robert Raposa
f9ab191c33 Fix mako-wrap-html
- Make mako-wrap-html fire when '<' found anywhere in unwrapped string
- Fix typo
- Fix quality errors
- Fix defect found when Python string broken over lines
2016-04-12 13:06:11 -04:00
Robert Raposa
46c113ce60 Add check for strings that should be wrapped with HTML()
Also include the following:
- new rule for strings that should be wrapped with HTML()
- allow expressions to use "| n, unicode"
- refactor string parsing into separate class
- switch end_index to be the index following the expression
2016-04-12 10:48:33 -04:00
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
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
Robert Raposa
eb42cb1f38 Add safe template linter
- Initial lint of Mako templates
- Initial lint of Underscore.js templates
2016-03-12 21:12:06 -05:00