golangci-lint/test/testdata/golint.go

23 lines
557 B
Go
Raw Normal View History

// args: -Egolint
2018-05-06 07:20:12 +03:00
package testdata
2018-05-06 14:51:06 +03:00
var Go_lint string // ERROR "don't use underscores in Go names; var Go_lint should be GoLint"
2018-05-06 13:41:42 +03:00
func ExportedFuncWithNoComment() {
}
var ExportedVarWithNoComment string
type ExportedStructWithNoComment struct{}
type ExportedInterfaceWithNoComment interface{}
// Bad comment
2018-05-06 13:41:42 +03:00
func ExportedFuncWithBadComment() {}
2018-05-08 13:33:00 +03:00
type GolintTest struct{}
func (receiver1 GolintTest) A() {}
func (receiver2 GolintTest) B() {} // ERROR "receiver name receiver2 should be consistent with previous receiver name receiver1 for GolintTest"