2020-04-27 10:16:16 +02:00
|
|
|
# See https://github.com/returntocorp/semgrep/blob/develop/docs/config.md for semgrep rule format
|
2020-03-19 00:32:26 +01:00
|
|
|
|
|
|
|
rules:
|
|
|
|
- id: deprecated-render-usage
|
|
|
|
pattern: django.shortcuts.render_to_response(...)
|
|
|
|
message: Use render() (from django.shortcuts) instead of render_to_response()
|
|
|
|
languages: [python]
|
|
|
|
severity: ERROR
|
|
|
|
- id: useless-if-body
|
|
|
|
patterns:
|
|
|
|
- pattern: |
|
|
|
|
if $X:
|
|
|
|
$S
|
|
|
|
else:
|
|
|
|
$S
|
|
|
|
message: "useless if statment; both blocks have the same body"
|
|
|
|
languages: [python]
|
|
|
|
severity: ERROR
|