-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sort ordering and type alias resolution (#8438)
* Fix sort ordering and type alias resolution Sort diagnostics and navigation slices. This requires a custom JSON marshaler for Navigation as it contains a map and the default behavior is non-deterministic. Recursively resolve type aliases. This is to handle cases where a type alias is to another type alias. * remove custom JSON marshaler according to the docs, the keys *are* sorted * add unit test * add code owners for Go APIView tool
- Loading branch information
1 parent
72ee2e1
commit 044a1fa
Showing
12 changed files
with
205 additions
and
85 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module github.com/Azure/azure-sdk-for-go/sdk/test_multi_recursive_alias | ||
|
||
go 1.18 |
13 changes: 13 additions & 0 deletions
13
src/go/cmd/testdata/test_multi_recursive_alias/internal/exported/source.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package exported | ||
|
||
type Type1 struct { | ||
Foo string | ||
} | ||
|
||
type Type2 struct { | ||
Foo string | ||
} | ||
|
||
type Type3 struct { | ||
Foo string | ||
} |
9 changes: 9 additions & 0 deletions
9
src/go/cmd/testdata/test_multi_recursive_alias/pkga/source.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pkga | ||
|
||
import "github.com/Azure/azure-sdk-for-go/sdk/test_multi_recursive_alias/pkgb" | ||
|
||
type Type1 = pkgb.Type1 | ||
|
||
type Type2 = pkgb.Type2 | ||
|
||
type Type3 = pkgb.Type3 |
9 changes: 9 additions & 0 deletions
9
src/go/cmd/testdata/test_multi_recursive_alias/pkgb/source.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pkgb | ||
|
||
import "github.com/Azure/azure-sdk-for-go/sdk/test_multi_recursive_alias/pkgc" | ||
|
||
type Type1 = pkgc.Type1 | ||
|
||
type Type2 = pkgc.Type2 | ||
|
||
type Type3 = pkgc.Type3 |
9 changes: 9 additions & 0 deletions
9
src/go/cmd/testdata/test_multi_recursive_alias/pkgc/source.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pkgc | ||
|
||
import "github.com/Azure/azure-sdk-for-go/sdk/test_multi_recursive_alias/internal/exported" | ||
|
||
type Type1 = exported.Type1 | ||
|
||
type Type2 = exported.Type2 | ||
|
||
type Type3 = exported.Type3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters