mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
Make test-tidy ignore braces surrounded by backticks
This commit is contained in:
parent
c77d3b965f
commit
bd363b009d
1 changed files with 4 additions and 4 deletions
|
@ -305,13 +305,13 @@ def check_rust(file_name, contents):
|
|||
if match:
|
||||
yield (idx + 1, "missing space before {")
|
||||
|
||||
# ignored cases like {} and }}
|
||||
match = re.search(r"[^\s{}]}", line)
|
||||
# ignored cases like {}, }` and }}
|
||||
match = re.search(r"[^\s{}]}[^`]", line)
|
||||
if match and not (line.startswith("use") or line.startswith("pub use")):
|
||||
yield (idx + 1, "missing space before }")
|
||||
|
||||
# ignored cases like {} and {{
|
||||
match = re.search(r"{[^\s{}]", line)
|
||||
# ignored cases like {}, `{ and {{
|
||||
match = re.search(r"[^`]{[^\s{}]", line)
|
||||
if match and not (line.startswith("use") or line.startswith("pub use")):
|
||||
yield (idx + 1, "missing space after {")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue