mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
add tagalign linter (#3709)
This commit is contained in:
parent
69f929b227
commit
134f2e0491
13 changed files with 218 additions and 0 deletions
|
@ -110,6 +110,11 @@ var defaultLintersSettings = LintersSettings{
|
|||
Ignore: "",
|
||||
Qualified: false,
|
||||
},
|
||||
TagAlign: TagAlignSettings{
|
||||
Align: true,
|
||||
Sort: true,
|
||||
Order: nil,
|
||||
},
|
||||
Testpackage: TestpackageSettings{
|
||||
SkipRegexp: `(export|internal)_test\.go`,
|
||||
AllowPackages: []string{"main"},
|
||||
|
@ -203,6 +208,7 @@ type LintersSettings struct {
|
|||
Staticcheck StaticCheckSettings
|
||||
Structcheck StructCheckSettings
|
||||
Stylecheck StaticCheckSettings
|
||||
TagAlign TagAlignSettings
|
||||
Tagliatelle TagliatelleSettings
|
||||
Tenv TenvSettings
|
||||
Testpackage TestpackageSettings
|
||||
|
@ -655,6 +661,12 @@ type StructCheckSettings struct {
|
|||
CheckExportedFields bool `mapstructure:"exported-fields"`
|
||||
}
|
||||
|
||||
type TagAlignSettings struct {
|
||||
Align bool `mapstructure:"align"`
|
||||
Sort bool `mapstructure:"sort"`
|
||||
Order []string `mapstructure:"order"`
|
||||
}
|
||||
|
||||
type TagliatelleSettings struct {
|
||||
Case struct {
|
||||
Rules map[string]string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue