mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Report use statements that use {} with only one entry
This commit is contained in:
parent
4dcb05ca4f
commit
40acd24e8f
55 changed files with 92 additions and 89 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue