mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01: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:
|
if match:
|
||||||
yield (idx + 1, "missing space before {")
|
yield (idx + 1, "missing space before {")
|
||||||
|
|
||||||
# ignored cases like {} and }}
|
# ignored cases like {}, }` and }}
|
||||||
match = re.search(r"[^\s{}]}", line)
|
match = re.search(r"[^\s{}]}[^`]", line)
|
||||||
if match and not (line.startswith("use") or line.startswith("pub use")):
|
if match and not (line.startswith("use") or line.startswith("pub use")):
|
||||||
yield (idx + 1, "missing space before }")
|
yield (idx + 1, "missing space before }")
|
||||||
|
|
||||||
# ignored cases like {} and {{
|
# ignored cases like {}, `{ and {{
|
||||||
match = re.search(r"{[^\s{}]", line)
|
match = re.search(r"[^`]{[^\s{}]", line)
|
||||||
if match and not (line.startswith("use") or line.startswith("pub use")):
|
if match and not (line.startswith("use") or line.startswith("pub use")):
|
||||||
yield (idx + 1, "missing space after {")
|
yield (idx + 1, "missing space after {")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue