Skip to content

Commit 3245ed2

Browse files
tsuzuJoelSpeed
authored andcommitted
Add a test for multiple type declarations
1 parent 1ad4d04 commit 3245ed2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

pkg/analysis/commentstart/testdata/src/a/a.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ type unexportedStruct struct {
5757
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
5858
}
5959

60+
type (
61+
MultipleTypeDeclaration1 struct {
62+
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
63+
}
64+
MultipleTypeDeclaration2 struct {
65+
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
66+
}
67+
)
68+
6069
func FunctionWithStructs() {
6170
type InaccessibleStruct struct {
6271
NoComment string `json:"noComment"`

pkg/analysis/commentstart/testdata/src/a/a.go.golden

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ type unexportedStruct struct {
5757
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
5858
}
5959

60+
type (
61+
MultipleTypeDeclaration1 struct {
62+
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
63+
}
64+
MultipleTypeDeclaration2 struct {
65+
NoComment string `json:"noComment"` // want "field NoComment is missing godoc comment"
66+
}
67+
)
68+
6069
func FunctionWithStructs() {
6170
type InaccessibleStruct struct {
6271
NoComment string `json:"noComment"`

0 commit comments

Comments
 (0)