diff options
author | Cullen Rhodes <rhodes.cullen@gmail.com> | 2016-05-22 16:32:18 +0100 |
---|---|---|
committer | Cullen Rhodes <rhodes.cullen@gmail.com> | 2016-05-27 10:18:44 +0100 |
commit | 40acd24e8fef2a3c46ecdb21b4be1363d48e8ec4 (patch) | |
tree | a7786b1554ccc97240fdde367fe0ed5455c4c59f /python/tidy/servo_tidy/tidy.py | |
parent | 4dcb05ca4f521b2c5eb12000678be035465e092b (diff) | |
download | servo-40acd24e8fef2a3c46ecdb21b4be1363d48e8ec4.tar.gz servo-40acd24e8fef2a3c46ecdb21b4be1363d48e8ec4.zip |
Report use statements that use {} with only one entry
Diffstat (limited to 'python/tidy/servo_tidy/tidy.py')
-rw-r--r-- | python/tidy/servo_tidy/tidy.py | 2 |
1 files changed, 2 insertions, 0 deletions
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: |