Azure / Azure/azure-sdk-tools

Sort types and members consistently in APIView

Open
#676 5 comments 1 reaction 0 assignees View on GitHub
.NET APIView C++ enhancement feature-request Go Javascript
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.