mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
linter: Remove redundant custom rule file delimitors.
This commit is contained in:
@@ -119,8 +119,7 @@ def build_custom_checkers(by_lang):
|
|||||||
trailing_whitespace_rule,
|
trailing_whitespace_rule,
|
||||||
{'pattern': '\t',
|
{'pattern': '\t',
|
||||||
'strip': '\n',
|
'strip': '\n',
|
||||||
'exclude': set(['zerver/lib/bugdown/codehilite.py',
|
'exclude': set(['tools/travis/success-http-headers.txt']),
|
||||||
'tools/travis/success-http-headers.txt']),
|
|
||||||
'description': 'Fix tab-based whitespace'},
|
'description': 'Fix tab-based whitespace'},
|
||||||
] # type: RuleList
|
] # type: RuleList
|
||||||
markdown_whitespace_rules = list([rule for rule in whitespace_rules if rule['pattern'] != '\s+$']) + [
|
markdown_whitespace_rules = list([rule for rule in whitespace_rules if rule['pattern'] != '\s+$']) + [
|
||||||
@@ -270,7 +269,6 @@ def build_custom_checkers(by_lang):
|
|||||||
{'pattern': '([a-zA-Z0-9_]+)=REQ\([\'"]\\1[\'"]',
|
{'pattern': '([a-zA-Z0-9_]+)=REQ\([\'"]\\1[\'"]',
|
||||||
'description': 'REQ\'s first argument already defaults to parameter name'},
|
'description': 'REQ\'s first argument already defaults to parameter name'},
|
||||||
{'pattern': 'self\.client\.(get|post|patch|put|delete)',
|
{'pattern': 'self\.client\.(get|post|patch|put|delete)',
|
||||||
'exclude': set(['zilencer/tests.py']),
|
|
||||||
'description': \
|
'description': \
|
||||||
'''Do not call self.client directly for put/patch/post/get.
|
'''Do not call self.client directly for put/patch/post/get.
|
||||||
See WRAPPER_COMMENT in test_helpers.py for details.
|
See WRAPPER_COMMENT in test_helpers.py for details.
|
||||||
@@ -323,11 +321,6 @@ def build_custom_checkers(by_lang):
|
|||||||
{'pattern': 'render_to_response\(',
|
{'pattern': 'render_to_response\(',
|
||||||
'description': "Use render() instead of render_to_response().",
|
'description': "Use render() instead of render_to_response().",
|
||||||
},
|
},
|
||||||
{'pattern': '(^|\s)open\s*\(',
|
|
||||||
'description': 'open() should not be used in Zulip\'s bots. Use functions'
|
|
||||||
' provided by the bots framework to access the filesystem.',
|
|
||||||
'include_only': set(['api/bots/']),
|
|
||||||
'exclude': set(['api/bots/john/john.py'])},
|
|
||||||
]) + whitespace_rules
|
]) + whitespace_rules
|
||||||
bash_rules = [
|
bash_rules = [
|
||||||
{'pattern': '#!.*sh [-xe]',
|
{'pattern': '#!.*sh [-xe]',
|
||||||
|
|||||||
Reference in New Issue
Block a user