dev: add fix test for tagalign linter (#4594)
This commit is contained in:
parent
17a65b12ea
commit
f96314f5a3
11
test/testdata/fix/in/tagalign.go
vendored
Normal file
11
test/testdata/fix/in/tagalign.go
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
//golangcitest:args -Etagalign
|
||||||
|
//golangcitest:config_path testdata/configs/tagalign_strict.yml
|
||||||
|
//golangcitest:expected_exitcode 0
|
||||||
|
package p
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TagAlignExampleStrictKO struct {
|
||||||
|
Foo time.Time `json:"foo,omitempty" validate:"required" zip:"foo"`
|
||||||
|
FooBar struct{} `gorm:"column:fooBar" validate:"required" zip:"fooBar" xml:"fooBar" json:"fooBar,omitempty" yaml:"fooBar"`
|
||||||
|
}
|
11
test/testdata/fix/out/tagalign.go
vendored
Normal file
11
test/testdata/fix/out/tagalign.go
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
//golangcitest:args -Etagalign
|
||||||
|
//golangcitest:config_path testdata/configs/tagalign_strict.yml
|
||||||
|
//golangcitest:expected_exitcode 0
|
||||||
|
package p
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type TagAlignExampleStrictKO struct {
|
||||||
|
Foo time.Time ` json:"foo,omitempty" validate:"required" zip:"foo"`
|
||||||
|
FooBar struct{} `gorm:"column:fooBar" json:"fooBar,omitempty" validate:"required" xml:"fooBar" yaml:"fooBar" zip:"fooBar"`
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user