1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-17 01:12:27 +02:00

refactor: rename files to follow Go convention

This commit is contained in:
Oleksandr Redko
2024-11-11 13:39:10 +02:00
committed by chavacava
parent c0d4d07ab6
commit be95bfa705
299 changed files with 181 additions and 178 deletions

64
testdata/nested_structs.go vendored Normal file
View File

@ -0,0 +1,64 @@
package fixtures
type Foo struct {
Bar struct { // MATCH /no nested structs are allowed/
Baz struct { // MATCH /no nested structs are allowed/
b bool
Qux struct { // MATCH /no nested structs are allowed/
b bool
}
}
}
}
type Quux struct {
Quuz Quuz
}
type Quuz struct {
}
type Quiz struct {
s struct{} // MATCH /no nested structs are allowed/
}
type nestedStructInChan struct {
c chan struct {
a int
b struct{ c int } // MATCH /no nested structs are allowed/
}
}
func waldo() (s struct{ b bool }) { return s }
func fred() interface{} {
s := struct {
b bool
t struct { // MATCH /no nested structs are allowed/
b bool
}
}{}
return s
}
// issue 664
type Bad struct {
Field []struct{} // MATCH /no nested structs are allowed/
}
// issue744
type issue744 struct {
c chan struct{}
}
// issue 781
type mySetInterface interface {
GetSet() map[string]struct{}
}
// issue 824
type test struct {
foo []chan struct{} // Must not match
bar map[string]struct{} // Must not match
}