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
|
api/integrations/perforce/git_p4.py
|
||||||
puppet/apt/.forge-release
|
puppet/apt/.forge-release
|
||||||
puppet/puppet-common/tests/
|
puppet/puppet-common/tests/
|
||||||
|
puppet/apt/README.md
|
||||||
""".split()
|
""".split()
|
||||||
|
|
||||||
by_lang = lister.list_files(args, modified_only=options.modified, use_shebang=True,
|
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,
|
# Invoke the appropriate lint checker for each language,
|
||||||
# and also check files for extra whitespace.
|
# and also check files for extra whitespace.
|
||||||
|
@ -154,6 +156,7 @@ css_rules = [
|
||||||
handlebars_rules = whitespace_rules
|
handlebars_rules = whitespace_rules
|
||||||
html_rules = whitespace_rules
|
html_rules = whitespace_rules
|
||||||
json_rules = [] # just fix newlines at ends of files
|
json_rules = [] # just fix newlines at ends of files
|
||||||
|
markdown_rules = whitespace_rules
|
||||||
|
|
||||||
def check_custom_checks():
|
def check_custom_checks():
|
||||||
failed = False
|
failed = False
|
||||||
|
@ -186,6 +189,10 @@ def check_custom_checks():
|
||||||
if custom_check_file(fn, json_rules):
|
if custom_check_file(fn, json_rules):
|
||||||
failed = True
|
failed = True
|
||||||
|
|
||||||
|
for fn in by_lang['md']:
|
||||||
|
if custom_check_file(fn, markdown_rules):
|
||||||
|
failed = True
|
||||||
|
|
||||||
return failed
|
return failed
|
||||||
|
|
||||||
lint_functions = {}
|
lint_functions = {}
|
||||||
|
|
Loading…
Reference in New Issue