Eric Fischer
27258425d2
Send contextual data through to studio-frontend
...
EDUCATOR-1529
2017-10-31 16:04:02 -04:00
Calen Pennington
f6b061c7a5
Improve ability to discriminate between django and mako template
...
Django-format comments are now used to detect a django template.
Note: Django templates are still not linted.
2017-08-23 12:17:40 -04:00
Robert Raposa
b370fe2314
Part II: Rename xss linter.
2017-06-30 13:20:23 -04:00
Robert Raposa
168a45b482
Part I: Rename xss-linter (files only).
...
This requires the next commit to work, but needed to be
is a separate commit to keep history.
2017-06-30 13:18:50 -04:00
Andy Armstrong
93235d118d
Reorder imports using isort (except lms and cms)
2017-05-30 16:04:54 -04:00
Robert Raposa
ff862612da
Fix false positives on javascript_contact_html.
2016-05-27 13:23:54 -04:00
Robert Raposa
cf3ef8aae3
Enhance safe template linter.
...
- Lint directories and files in sorted order.
- Lint python blocks in Mako.
2016-05-18 14:23:57 -04:00
Robert Raposa
73966d1a05
Add output of violation counts by rule
2016-05-10 15:35:57 -04:00
Robert Raposa
60d11bf2fd
Fix Python false positives with AST.
...
- Use AST to parse Python.
- Refactor Mako to use Python linting.
- Add optional verbose script argument.
- Skip tests.py files when linting.
2016-05-03 15:17:09 -04:00
Robert Raposa
1dfe0e8a4e
Merge pull request #12254 from edx/robrap/linter-javascript-context
...
TNL-4427: Add additional JavaScript context tags
2016-04-28 18:00:20 -04:00
Robert Raposa
b67c133910
Add additional JavaScript context tags
2016-04-28 12:16:10 -04:00
Robert Raposa
ac935e02a6
Add script for checking git commit is safe
2016-04-28 10:52:43 -04:00
Robert Raposa
374dcb3264
Add Python linting
2016-04-27 17:40:30 -04:00
Robert Raposa
d1bda204e4
Enhance Mako linting
...
- Lint JavaScript context for JavaScript violations
- Lint for Mako specific JavaScript rules
- Skip commented lines
- Change unicode to decode.utf8
- Count lint violations
2016-04-21 01:23:50 -04:00
Robert Raposa
11982461aa
Add JavaScript linting rules
...
- check proper use of JQuery functions
- check for concatenation with HTML strings
- add sort for output
- lint CoffeeScript
2016-04-20 16:29:55 -04:00
Robert Raposa
14abf32b4b
Add check for HTML entities
2016-04-16 15:24:56 +00:00
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