mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
lint: Add linters to help enforce profile/base layering.
This commit is contained in:
committed by
Tim Abbott
parent
e81bc19e45
commit
7b2112baf3
@@ -697,6 +697,27 @@ help_markdown_rules = RuleList(
|
||||
length_exclude=markdown_docs_length_exclude,
|
||||
)
|
||||
|
||||
puppet_rules = RuleList(
|
||||
langs=['pp'],
|
||||
rules=[
|
||||
{'pattern': r'(include\s+|\$)zulip::(profile|base)\b',
|
||||
'exclude': {
|
||||
'puppet/zulip/manifests/profile/',
|
||||
'puppet/zulip_ops/manifests/',
|
||||
'puppet/zulip/manifests/dockervoyager.pp',
|
||||
},
|
||||
'description': 'Abstraction layering violation; only profiles should reference profiles or zulip::base',
|
||||
},
|
||||
{'pattern': r'(include\s+|\$)zulip_ops::(profile|base)\b',
|
||||
'exclude': {
|
||||
'puppet/zulip/manifests/',
|
||||
'puppet/zulip_ops/manifests/profile/',
|
||||
},
|
||||
'description': 'Abstraction layering violation; only profiles should reference profiles or zulip_ops::base',
|
||||
},
|
||||
],
|
||||
)
|
||||
|
||||
txt_rules = RuleList(
|
||||
langs=['txt', 'text', 'yaml', 'rst', 'yml'],
|
||||
rules=whitespace_rules,
|
||||
@@ -711,4 +732,5 @@ non_py_rules = [
|
||||
help_markdown_rules,
|
||||
bash_rules,
|
||||
txt_rules,
|
||||
puppet_rules,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user