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:
Hugo Thiessard
2016-09-23 22:16:57 -05:00
parent 0dea697810
commit 5a99187fb2
4 changed files with 13 additions and 1 deletions

View File

@@ -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 ; )* ) => ());
}

View File

@@ -109,6 +109,9 @@ class CheckTidiness(unittest.TestCase):
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('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)
def test_spec_link(self):