mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
Add tagliatelle linter (#1906)
This commit is contained in:
parent
0f3f9ef809
commit
93df6f75f5
7 changed files with 97 additions and 0 deletions
33
test/testdata/tagliatelle.go
vendored
Normal file
33
test/testdata/tagliatelle.go
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
//args: -Etagliatelle
|
||||
package testdata
|
||||
|
||||
import "time"
|
||||
|
||||
type TglFoo struct {
|
||||
ID string `json:"ID"` // ERROR `json\(camel\): got 'ID' want 'id'`
|
||||
UserID string `json:"UserID"` // ERROR `json\(camel\): got 'UserID' want 'userId'`
|
||||
Name string `json:"name"`
|
||||
Value time.Duration `json:"value,omitempty"`
|
||||
Bar TglBar `json:"bar"`
|
||||
Bur `json:"bur"`
|
||||
}
|
||||
|
||||
type TglBar struct {
|
||||
Name string `json:"-"`
|
||||
Value string `json:"value"`
|
||||
CommonServiceFooItem *TglBir `json:"CommonServiceItem,omitempty"` // ERROR `json\(camel\): got 'CommonServiceItem' want 'commonServiceItem'`
|
||||
}
|
||||
|
||||
type TglBir struct {
|
||||
Name string `json:"-"`
|
||||
Value string `json:"value"`
|
||||
ReplaceAllowList []string `mapstructure:"replace-allow-list"`
|
||||
}
|
||||
|
||||
type Bur struct {
|
||||
Name string
|
||||
Value string `yaml:"Value"` // ERROR `yaml\(camel\): got 'Value' want 'value'`
|
||||
More string `json:"-"`
|
||||
Also string `json:",omitempty"`
|
||||
ReqPerS string `avro:"req_per_s"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue