servo: Merge #14896 - Tidy assignments (from g1smo:tidy-assignments); r=jdm
<!-- Please describe your changes on the following line: --> I've added a new tidy rule (no = in the beginning of line) + tests for it. Also cleaned up a few rust source files to accord with the new rule. --- <!-- 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 #14890 (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: b6c137b36f8b9f9cc5c0105bb94a4edeaf7d09be
This commit is contained in:
@@ -520,6 +520,8 @@ def check_rust(file_name, lines):
|
||||
lambda match, line: is_attribute),
|
||||
(r"=[A-Za-z0-9\"]", "missing space after =",
|
||||
lambda match, line: is_attribute),
|
||||
(r"^=\s", "no = in the beginning of line",
|
||||
lambda match, line: not is_comment),
|
||||
# ignore scientific notation patterns like 1e-6
|
||||
(r"[A-DF-Za-df-z0-9]-", "missing space before -",
|
||||
lambda match, line: not is_attribute),
|
||||
|
||||
Reference in New Issue
Block a user