mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Make tidy check that opening and closing braces that begin a line do so with proper alignment.
This commit is contained in:
parent
a754c10e79
commit
57e74542ee
3 changed files with 23 additions and 3 deletions
|
@ -63,4 +63,13 @@ impl test {
|
|||
|
||||
let var
|
||||
= "val";
|
||||
|
||||
fn test_fun4()
|
||||
{
|
||||
}
|
||||
let var = if true {
|
||||
"true"
|
||||
} else { // Should not trigger
|
||||
"false"
|
||||
} // Should not trigger
|
||||
}
|
||||
|
|
|
@ -131,6 +131,8 @@ class CheckTidiness(unittest.TestCase):
|
|||
self.assertEqual('extra space after (', errors.next()[2])
|
||||
self.assertEqual('extra space after test_fun', errors.next()[2])
|
||||
self.assertEqual('no = in the beginning of line', errors.next()[2])
|
||||
self.assertEqual('space before { is not a multiple of 4', errors.next()[2])
|
||||
self.assertEqual('space before } is not a multiple of 4', errors.next()[2])
|
||||
self.assertNoMoreErrors(errors)
|
||||
|
||||
feature_errors = tidy.collect_errors_for_files(iterFile('lib.rs'), [], [tidy.check_rust], print_text=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue