servo: Merge #13361 - Report tidy error for space after ( (from Mylainos:issue-13350); r=Wafflespeanut
<!-- Please describe your changes on the following line: --> Add report in tidy for code which have a space after the `(` like `some_function( argument)` --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13350 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 2ba804e6db52637fbe23fbecfd0e65b4db1a49e2
This commit is contained in:
@@ -483,6 +483,7 @@ def check_rust(file_name, lines):
|
||||
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
|
||||
lambda match, line: line.startswith('use ')),
|
||||
(r"^\s*else {", "else braces should be on the same line", no_filter),
|
||||
(r"[^$ ]\([ \t]", "extra space after (", no_filter),
|
||||
]
|
||||
|
||||
for pattern, message, filter_func in regex_rules:
|
||||
|
||||
Reference in New Issue
Block a user