Order API elements alphabetically by name
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 115
Description
`apiviewgo` orders API elements first by kind, then alphabetically by name. For example, `type A interface` appears before `type Z interface` but both appear before `type A struct` because interfaces appear before structs. Ordering elements by name alone would make reviews easier to navigate.
Making it so isn't trivial and will entail reconsidering some `apiviewgo` architecture. My first thought is to introduce a common interface to the various `apiviewgo` types representing review elements. If this interface had methods for getting an element's name and its APIView tokens, it would be straightforward to collect all a module's elements, sort them by name, and output them while ignoring distinctions like `interface` vs `struct`.
Contributor guide
Research direction
Start by tracing how apiviewgo represents review elements and how a module currently orders and emits them. Examine whether a common interface can expose each element's name and APIView tokens. Done means all module elements are output alphabetically by name, without ordering interfaces, structs, or other kinds separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100