linter: Add a rule to check render_to_response.

This commit is contained in:
Umair Khan 2017-03-20 13:41:19 +05:00 committed by Tim Abbott
parent 24c2e62ae1
commit 38572311f9
1 changed files with 4 additions and 0 deletions

View File

@ -425,6 +425,10 @@ def build_custom_checkers(by_lang):
'description': "Don't use datetime in backend code.\n"
"See https://zulip.readthedocs.io/en/latest/code-style.html#naive-datetime-objects",
},
{'pattern': 'render_to_response\(',
'description': "Use render() instead of render_to_response().",
'exclude': set(['tools/lint-all']),
},
# This rule might give false positives in virtualenv setup files which should be excluded,
# and comments which should be rewritten to avoid use of "python2", "python3", etc.
{'pattern': 'python[23]',