Auto merge of #12243 - TravisDean:else-brace-check, r=ConnorGBrewster

Add style check and test for else braces

<!-- Please describe your changes on the following line: -->
Added a regex check to enforce project style guidelines. Added unit check. Catches:
```
}
else {
```
when it should be
`} else {`

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors (no core files changed)
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12234 (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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12243)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-04 16:52:19 -07:00 committed by GitHub
commit e21b47c2cc
9 changed files with 26 additions and 20 deletions

View file

@ -1788,8 +1788,11 @@ impl ScaledFontExtensionMethods for ScaledFont {
let mut options = struct__AzDrawOptions {
mAlpha: 1f64 as AzFloat,
mCompositionOp: CompositionOp::Over as u8,
mAntialiasMode: if antialias { AntialiasMode::Subpixel as u8 }
else { AntialiasMode::None as u8 }
mAntialiasMode: if antialias {
AntialiasMode::Subpixel as u8
} else {
AntialiasMode::None as u8
}
};
let mut origin = baseline_origin.clone();