feat: add sloglint linter (#4133)

This commit is contained in:
Thomas 2023-10-19 13:42:40 +03:00 committed by GitHub
parent cf93cf57dd
commit 39c5fd10ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 157 additions and 0 deletions

View file

@ -113,6 +113,12 @@ var defaultLintersSettings = LintersSettings{
Ignore: "",
Qualified: false,
},
SlogLint: SlogLintSettings{
KVOnly: false,
AttrOnly: false,
NoRawKeys: false,
ArgsOnSepLines: false,
},
TagAlign: TagAlignSettings{
Align: true,
Sort: true,
@ -222,6 +228,7 @@ type LintersSettings struct {
Reassign ReassignSettings
Revive ReviveSettings
RowsErrCheck RowsErrCheckSettings
SlogLint SlogLintSettings
Staticcheck StaticCheckSettings
Structcheck StructCheckSettings
Stylecheck StaticCheckSettings
@ -717,6 +724,13 @@ type RowsErrCheckSettings struct {
Packages []string
}
type SlogLintSettings struct {
KVOnly bool `mapstructure:"kv-only"`
AttrOnly bool `mapstructure:"attr-only"`
NoRawKeys bool `mapstructure:"no-raw-keys"`
ArgsOnSepLines bool `mapstructure:"args-on-sep-lines"`
}
type StaticCheckSettings struct {
// Deprecated: use the global `run.go` instead.
GoVersion string `mapstructure:"go"`