Rust tidy: disallow assignment = in the beginning of line

This commit is contained in:
Jure Podgoršek 2017-01-06 20:48:23 +01:00
parent 6d4ccab2b7
commit adcedd8314
3 changed files with 6 additions and 0 deletions

View file

@ -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),