mirror of
https://github.com/zulip/zulip.git
synced 2025-11-22 07:21:23 +00:00
lint: Check whitespace rules for txt files.
This commit is contained in:
@@ -47,7 +47,7 @@ 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', 'md'],
|
ftypes=['py', 'sh', 'js', 'pp', 'css', 'handlebars', 'html', 'json', 'md', 'txt', 'text'],
|
||||||
group_by_ftype=True, exclude=exclude)
|
group_by_ftype=True, exclude=exclude)
|
||||||
|
|
||||||
# Invoke the appropriate lint checker for each language,
|
# Invoke the appropriate lint checker for each language,
|
||||||
@@ -157,6 +157,7 @@ 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
|
markdown_rules = whitespace_rules
|
||||||
|
txt_rules = whitespace_rules
|
||||||
|
|
||||||
def check_custom_checks():
|
def check_custom_checks():
|
||||||
failed = False
|
failed = False
|
||||||
@@ -193,6 +194,10 @@ def check_custom_checks():
|
|||||||
if custom_check_file(fn, markdown_rules):
|
if custom_check_file(fn, markdown_rules):
|
||||||
failed = True
|
failed = True
|
||||||
|
|
||||||
|
for fn in by_lang['txt'] + by_lang['text']:
|
||||||
|
if custom_check_file(fn, txt_rules):
|
||||||
|
failed = True
|
||||||
|
|
||||||
return failed
|
return failed
|
||||||
|
|
||||||
lint_functions = {}
|
lint_functions = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user