Add style check, test, and code fixes for an else brace check.

This commit is contained in:
Travis Dean 2016-07-04 17:05:20 -04:00
parent 80cb0cf821
commit 6642358217
9 changed files with 26 additions and 20 deletions

View file

@ -415,6 +415,7 @@ def check_rust(file_name, lines):
(r"^&&", "operators should go at the end of the first line", no_filter),
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
lambda match, line: line.startswith('use ')),
(r"^\s*else {", "else braces should be on the same line", no_filter),
]
for pattern, message, filter_func in regex_rules: