Skip to content

Commit 8bc5adb

Browse files
Fix GitHub check annotations (#221)
* Fix GitHub check annotations * Update types.go
1 parent 3dc5f3d commit 8bc5adb

File tree

27 files changed

+73
-2
lines changed

27 files changed

+73
-2
lines changed

internal/template/template_data.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ func (m MethodData) ReturnArgNameList() string {
9090
return strings.Join(params, ", ")
9191
}
9292

93+
// TypeParamData extends ParamData with a constraint.
9394
type TypeParamData struct {
9495
ParamData
9596
Constraint types.Type

pkg/moq/testpackages/anonimport/iface.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
)
66

7+
// Example is a test interface.
78
type Example interface {
89
Ctx(ctx context.Context)
910
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package anonimport
22

33
import (
4-
_ "context"
4+
_ "context" // import for side effects
55
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package blankid
22

3+
// Swallower is a test interface.
34
type Swallower interface {
45
Swallow(_ string)
56
}

pkg/moq/testpackages/genericreturn/genericreturn.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ package genericreturn
22

33
import "github.com/matryer/moq/pkg/moq/testpackages/genericreturn/otherpackage"
44

5+
// GenericBar is a test type.
56
type GenericBar[T any] struct {
67
Bar T
78
}
89

10+
// IFooBar is a test interface.
911
type IFooBar interface {
1012
Foobar() GenericBar[otherpackage.Foo]
1113
}

pkg/moq/testpackages/genericreturn/otherpackage/otherpackage.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package otherpackage
22

3+
// Foo is a test struct.
34
type Foo struct {
45
A int
56
B string

pkg/moq/testpackages/generics/generics.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,32 @@ import (
55
"fmt"
66
)
77

8+
// GenericStore1 is a test interface.
89
type GenericStore1[T Key1, S any] interface {
910
Get(ctx context.Context, id T) (S, error)
1011
Create(ctx context.Context, id T, value S) error
1112
}
1213

14+
// GenericStore2 is a test interface.
1315
type GenericStore2[T Key2, S any] interface {
1416
Get(ctx context.Context, id T) (S, error)
1517
Create(ctx context.Context, id T, value S) error
1618
}
1719

20+
// AliasStore is a test interface.
1821
type AliasStore GenericStore1[KeyImpl, bool]
1922

23+
// Key1 is a test interface.
2024
type Key1 interface {
2125
fmt.Stringer
2226
}
2327

28+
// Key2 is a test interface.
2429
type Key2 interface {
2530
~[]byte | string
2631
}
2732

33+
// KeyImpl is a test type.
2834
type KeyImpl []byte
2935

3036
func (x KeyImpl) String() string {

pkg/moq/testpackages/genparamname/iface.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ import (
1212
)
1313

1414
type (
15-
Go func()
15+
// Go is a test function.
16+
Go func()
17+
1618
myType struct{}
1719
)
1820

21+
// Interface is a test interface.
1922
type Interface interface {
2023
Method(
2124
*myType,

pkg/moq/testpackages/importalias/middleman.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
tgtclient "github.com/matryer/moq/pkg/moq/testpackages/importalias/target/client"
66
)
77

8+
// MiddleMan is a test interface.
89
type MiddleMan interface {
910
Connect(src srcclient.Client, tgt tgtclient.Client)
1011
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
package client
22

3+
// Client is a test struct.
34
type Client struct{}

0 commit comments

Comments
 (0)