mirror of https://github.com/zulip/zulip.git
lint: Check whitespace rules in markdown files too.
This commit is contained in:
parent
1a162ecb97
commit
39950b8f4f
|
@ -43,10 +43,12 @@ api/setup.py
|
|||
api/integrations/perforce/git_p4.py
|
||||
puppet/apt/.forge-release
|
||||
puppet/puppet-common/tests/
|
||||
puppet/apt/README.md
|
||||
""".split()
|
||||
|
||||
by_lang = lister.list_files(args, modified_only=options.modified, use_shebang=True,
|
||||
ftypes=['py', 'sh', 'js', 'pp', 'css', 'handlebars', 'html', 'json'], group_by_ftype=True, exclude=exclude)
|
||||
ftypes=['py', 'sh', 'js', 'pp', 'css', 'handlebars', 'html', 'json', 'md'],
|
||||
group_by_ftype=True, exclude=exclude)
|
||||
|
||||
# Invoke the appropriate lint checker for each language,
|
||||
# and also check files for extra whitespace.
|
||||
|
@ -154,6 +156,7 @@ css_rules = [
|
|||
handlebars_rules = whitespace_rules
|
||||
html_rules = whitespace_rules
|
||||
json_rules = [] # just fix newlines at ends of files
|
||||
markdown_rules = whitespace_rules
|
||||
|
||||
def check_custom_checks():
|
||||
failed = False
|
||||
|
@ -186,6 +189,10 @@ def check_custom_checks():
|
|||
if custom_check_file(fn, json_rules):
|
||||
failed = True
|
||||
|
||||
for fn in by_lang['md']:
|
||||
if custom_check_file(fn, markdown_rules):
|
||||
failed = True
|
||||
|
||||
return failed
|
||||
|
||||
lint_functions = {}
|
||||
|
|
Loading…
Reference in New Issue