From 40acd24e8fef2a3c46ecdb21b4be1363d48e8ec4 Mon Sep 17 00:00:00 2001 From: Cullen Rhodes Date: Sun, 22 May 2016 16:32:18 +0100 Subject: Report use statements that use {} with only one entry --- python/tidy/servo_tidy/tidy.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/tidy/servo_tidy') diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py index 6ec263b2678..fa080890eb9 100644 --- a/python/tidy/servo_tidy/tidy.py +++ b/python/tidy/servo_tidy/tidy.py @@ -390,6 +390,8 @@ def check_rust(file_name, lines): # No benefit over using &str (r": &String", "use &str instead of &String", no_filter), (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 ')), ] for pattern, message, filter_func in regex_rules: -- cgit v1.2.3