diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-08 02:22:27 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-21 10:59:36 +0200 |
commit | bd363b009db8e5e233cd862aef5c8d497495a10e (patch) | |
tree | 92aef71517ce5892126511cccd3eecb4ddbf4ab9 | |
parent | c77d3b965f6099ffcb2eddc359948f106afca7b5 (diff) | |
download | servo-bd363b009db8e5e233cd862aef5c8d497495a10e.tar.gz servo-bd363b009db8e5e233cd862aef5c8d497495a10e.zip |
Make test-tidy ignore braces surrounded by backticks
-rw-r--r-- | python/tidy.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/tidy.py b/python/tidy.py index 0fac94240c7..b0c61dba333 100644 --- a/python/tidy.py +++ b/python/tidy.py @@ -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 {") |