Sort types and members consistently in APIView
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 115
Description
Using APIView for API consistency reviews works pretty nice, though it would be *much* easier if tokens were sorted in both the types tree view and the content view, e.g:
1. Package name/namespace
2. Type name (regardless of whether it's a class, enum, struct, etc.)
3. Member name (regardless of whether it's a property, method, etc. - though constructors/inits first).
While 1 and 2 would already be helpful and should be universal across languages, ignoring the type of member (property vs. method, etc.) helps because Java doesn't have properties, for example, but at least alphabetical sorting makes getters and setters easy to find.
An improvement in time might be some sort of semantic ordering, like ignoring "get" and "set" prefixes for Java, or normalizing "Get" in .NET vs. "list" in other languages (usually), but just alphabetizing at a start would make going through API consistency reviews much easier.
Contributor guide
Research direction
Locate APIView's type tree and content view entry points, then inspect how tokens are currently ordered. Implement the stated package or namespace, type, and member ordering, with constructors or inits first, and verify that the ordering is consistent across the views and supported languages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100