dev: add fix test for tagalign linter (#4594)

This commit is contained in:
Oleksandr Redko 2024-03-29 15:21:44 +02:00 committed by GitHub
parent 17a65b12ea
commit f96314f5a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 0 deletions

11
test/testdata/fix/in/tagalign.go vendored Normal file
View 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
View 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"`
}