mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
lint: Exclude "subject" from JS files (except util.js).
We also exempt the frontend tests for now.
This commit is contained in:
@@ -261,6 +261,13 @@ def build_custom_checkers(by_lang):
|
||||
'bad_lines': ['###some heading', '#another heading']},
|
||||
] # type: RuleList
|
||||
js_rules = cast(RuleList, [
|
||||
{'pattern': 'subject|SUBJECT',
|
||||
'exclude': set(['static/js/util.js',
|
||||
'frontend_tests/']),
|
||||
'exclude_pattern': 'emails',
|
||||
'description': 'avoid subject in JS code',
|
||||
'good_lines': ['topic_name'],
|
||||
'bad_lines': ['subject="foo"', ' MAX_SUBJECT_LEN']},
|
||||
{'pattern': r'[^_]function\(',
|
||||
'description': 'The keyword "function" should be followed by a space'},
|
||||
{'pattern': r'.*blueslip.warning\(.*',
|
||||
|
||||
Reference in New Issue
Block a user