Skip to content

Commit f96314f

Browse files
authored
dev: add fix test for tagalign linter (#4594)
1 parent 17a65b1 commit f96314f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

test/testdata/fix/in/tagalign.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//golangcitest:args -Etagalign
2+
//golangcitest:config_path testdata/configs/tagalign_strict.yml
3+
//golangcitest:expected_exitcode 0
4+
package p
5+
6+
import "time"
7+
8+
type TagAlignExampleStrictKO struct {
9+
Foo time.Time `json:"foo,omitempty" validate:"required" zip:"foo"`
10+
FooBar struct{} `gorm:"column:fooBar" validate:"required" zip:"fooBar" xml:"fooBar" json:"fooBar,omitempty" yaml:"fooBar"`
11+
}

test/testdata/fix/out/tagalign.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//golangcitest:args -Etagalign
2+
//golangcitest:config_path testdata/configs/tagalign_strict.yml
3+
//golangcitest:expected_exitcode 0
4+
package p
5+
6+
import "time"
7+
8+
type TagAlignExampleStrictKO struct {
9+
Foo time.Time ` json:"foo,omitempty" validate:"required" zip:"foo"`
10+
FooBar struct{} `gorm:"column:fooBar" json:"fooBar,omitempty" validate:"required" xml:"fooBar" yaml:"fooBar" zip:"fooBar"`
11+
}

0 commit comments

Comments
 (0)