mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
linter: Add rule against multiple whitespaces after comma.
This commit is contained in:
parent
cfadb43b93
commit
194e102077
@ -390,7 +390,12 @@ def build_custom_checkers(by_lang):
|
||||
'exclude_pattern': '[.]_meta[.]pk',
|
||||
'description': "Use `id` instead of `pk`.",
|
||||
'good_lines': ['if my_django_model.id == 42', 'self.user_profile._meta.pk'],
|
||||
'bad_lines': ['if my_django_model.pk == 42']}
|
||||
'bad_lines': ['if my_django_model.pk == 42']},
|
||||
{'pattern': ', {2,}[^# ]',
|
||||
'exclude': set(['zerver/tests']),
|
||||
'description': "Remove multiple whitespaces after ','",
|
||||
'good_lines': ['foo(1, 2, 3)', 'foo = bar # some inline comment'],
|
||||
'bad_lines': ['foo(1, 2, 3)', 'foo(1, 2, 3)']},
|
||||
]) + whitespace_rules
|
||||
bash_rules = [
|
||||
{'pattern': '#!.*sh [-xe]',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user