Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

review: feat: sort imports alphabetically #1434

Merged
merged 3 commits into from
Jun 28, 2017

Conversation

pvojtechovsky
Copy link
Collaborator

The imports generated by Spoon pretty printer are sorted alphabetically now.

The main advantage is that Spoon produces same content with each printing now. Before the imports were randomly mixed (because of HashSet).

@pvojtechovsky pvojtechovsky changed the title feat: sort imports alphabetically review: feat: sort imports alphabetically Jun 26, 2017
@monperrus
Copy link
Collaborator

good idea! we need a test with the corresponding contract, thanks.

@tdurieux
Copy link
Collaborator

Personally I would separate the static import from the normal one.
Put all the static import at the beginning or at the end of the import list.

@pvojtechovsky
Copy link
Collaborator Author

Personally I would separate the static import from the normal one.

I agree that it can be done better, but I do not want to invest more time in it. The sorting was enough for now for me. If somebody wants it better, I will like it ;-)

@surli
Copy link
Collaborator

surli commented Jun 27, 2017

@pvojtechovsky I created another issue for @tdurieux idea. Could you add a test for this one, then I'll merged it.

@pvojtechovsky
Copy link
Collaborator Author

Test added. I am finished here.

@surli surli merged commit 16584c3 into INRIA:master Jun 28, 2017
@pvojtechovsky pvojtechovsky deleted the sortImports branch June 28, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants