lint: Check whitespace rules in markdown files too.

This commit is contained in:
Tim Abbott 2016-04-14 14:29:58 -07:00
parent 1a162ecb97
commit 39950b8f4f
1 changed files with 8 additions and 1 deletions

View File

@ -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 = {}