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

Method/Field sorting (a-z, grouped by visibility) #6

Closed
passsy opened this issue Sep 26, 2017 · 1 comment
Closed

Method/Field sorting (a-z, grouped by visibility) #6

passsy opened this issue Sep 26, 2017 · 1 comment

Comments

@passsy
Copy link
Contributor

passsy commented Sep 26, 2017

All methods and field of the AOSP source code are sorted alphabetically. This ends discussions about the "correct" order of functions. It also reduces merge conflicts because new methods/fields will be added at the correct place instead of the end of a class.

We improved this even further by grouping methods and fields by visibility. This means that public methods are sorted above protected, package private and private methods. Each group is sorted alphabetically. This moves implementation details to the bottom and public API to the top.

survey results

Our developer survey showed that our developers want to keep the method sorting. Especially the grouping by visibility, we use for years, is the favorite.

@passsy
Copy link
Contributor Author

passsy commented Sep 26, 2017

Already implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant