mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Issue #13350 Report tidy error for space after (
This commit is contained in:
parent
7b98c8a788
commit
0ac212afb1
4 changed files with 13 additions and 1 deletions
|
@ -593,7 +593,7 @@ impl HTMLFormElement {
|
||||||
"file" | "textarea" => (), // TODO
|
"file" | "textarea" => (), // TODO
|
||||||
_ => {
|
_ => {
|
||||||
datum.name = clean_crlf(&datum.name);
|
datum.name = clean_crlf(&datum.name);
|
||||||
datum.value = FormDatumValue::String(clean_crlf( match datum.value {
|
datum.value = FormDatumValue::String(clean_crlf(match datum.value {
|
||||||
FormDatumValue::String(ref s) => s,
|
FormDatumValue::String(ref s) => s,
|
||||||
FormDatumValue::File(_) => unreachable!()
|
FormDatumValue::File(_) => unreachable!()
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -483,6 +483,7 @@ def check_rust(file_name, lines):
|
||||||
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
|
(r"\{[A-Za-z0-9_]+\};", "use statement contains braces for single import",
|
||||||
lambda match, line: line.startswith('use ')),
|
lambda match, line: line.startswith('use ')),
|
||||||
(r"^\s*else {", "else braces should be on the same line", no_filter),
|
(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:
|
for pattern, message, filter_func in regex_rules:
|
||||||
|
|
|
@ -49,4 +49,12 @@ impl test {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Text_Fun3 = fn( i32) -> i32;
|
||||||
|
|
||||||
|
fn test_fun3<Text_Fun3>( y: Text_Fun3) {
|
||||||
|
test_fun( 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Should not be triggered
|
||||||
|
macro_rules! test_macro ( ( $( $fun:ident = $flag:ident ; )* ) => ());
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,9 @@ class CheckTidiness(unittest.TestCase):
|
||||||
self.assertEqual('use &T instead of &Root<T>', errors.next()[2])
|
self.assertEqual('use &T instead of &Root<T>', errors.next()[2])
|
||||||
self.assertEqual('operators should go at the end of the first line', errors.next()[2])
|
self.assertEqual('operators should go at the end of the first line', errors.next()[2])
|
||||||
self.assertEqual('else braces should be on the same line', errors.next()[2])
|
self.assertEqual('else braces should be on the same line', errors.next()[2])
|
||||||
|
self.assertEqual('extra space after (', errors.next()[2])
|
||||||
|
self.assertEqual('extra space after (', errors.next()[2])
|
||||||
|
self.assertEqual('extra space after (', errors.next()[2])
|
||||||
self.assertNoMoreErrors(errors)
|
self.assertNoMoreErrors(errors)
|
||||||
|
|
||||||
def test_spec_link(self):
|
def test_spec_link(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue