Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upReport use statements that use {} with only one entry #11320
Closed
Labels
Comments
bors-servo
added a commit
that referenced
this issue
May 26, 2016
Report use statements that use {} with only one entry
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 --faster` does not report any errors
- [X ] These changes fix #11320 (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/11329)
<!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
May 26, 2016
Report use statements that use {} with only one entry
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 --faster` does not report any errors
- [X ] These changes fix #11320 (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/11329)
<!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
May 27, 2016
Report use statements that use {} with only one entry
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 --faster` does not report any errors
- [X ] These changes fix #11320 (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/11329)
<!-- Reviewable:end -->
|
There's no longer any natural way to format a list of imports from the same module, where just one of the imports needs to wrap to the next line: // ERROR: use statement contains braces for single import
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
use script_layout_interface::restyle_damage::{RESOLVE_GENERATED_CONTENT};
// ERROR: use statement is not in alphabetical order
use script_layout_interface::restyle_damage::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW};
use script_layout_interface::restyle_damage::RESOLVE_GENERATED_CONTENT;Could we either revert this change, or change the alphabetization rule to ignore braces? |
|
Ignoring braces will require reformatting the whole tree. Reverting this change will be less work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our desired code style is:
not
Let's report these lines automatically as part of test-tidy.
Code:
python/tidy/servo_tidy/tidy.pyTest: Add one to
test_rustinpython/tidy/servo_tidy_tests/test_tidy.py, which checkspython/tidy/servo_tidy_tests/rust_tidy.rs. Run with./mach test-tidy --self.