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 upEnsure lists of modules are in alphabetical order #7390
Comments
|
See the code for checking sorted-ness of |
|
I'd like to work on this please. But if something like this happen :
we don't report an error because they are not sorted alphabetically, right ? |
|
@mylainos Go ahead and take it! And, I guess we could just neglect inline modules for now :) |
|
I think it's done but there is a problem with this line http://mxr.mozilla.org/servo/source/components/style/lib.rs#48. For me the lint should be at the upper line but what do you think ? |
|
@mylainos Yep, you're right. That's a bit ugly, put that |
|
I think it's cleaner in this case to keep it all on one line. |
|
We should be able to strip any attributes that are used by using the same code as http://mxr.mozilla.org/servo/source/python/tidy.py#194 . |
|
The regex at http://mxr.mozilla.org/servo/source/python/tidy.py#195 delete the whole line. This regex |
|
@mylainos Yes, you should! (also, add a keyword referring this issue) |
|
This might be better as a compiler lint (which uses the existing parser that already knows how to deal with attributes) rather than hack it with string manipulation and regexes. |
|
The regex that I changed But now tidy report that And this could conflict with #7460. |
Making test-tidy check that = have space after them For issue #7460. Need to ensure compatibility with #7390. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7468) <!-- Reviewable:end -->
fixes #7390 : tidy now check the order of mod declarations even whith attribute <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7680) <!-- Reviewable:end -->
…whith attribute
For lists like
We should verify that they are sorted alphabetically by module name and report an error if not.
Code: python/tidy.py