File tree Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -1855,10 +1855,13 @@ linters-settings:
18551855 - github.com/jmoiron/sqlx
18561856
18571857 sloglint :
1858- # Enforce using key-value pairs only (incompatible with attr-only).
1858+ # Enforce not mixing key-value pairs and attributes.
1859+ # Default: true
1860+ no-mixed-args : false
1861+ # Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
18591862 # Default: false
18601863 kv-only : true
1861- # Enforce using attributes only (incompatible with kv-only).
1864+ # Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
18621865 # Default: false
18631866 attr-only : true
18641867 # Enforce using methods that accept a context.
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ require (
121121 github.com/ykadowak/zerologlint v0.1.5
122122 gitlab.com/bosi/decorder v0.4.1
123123 go-simpler.org/musttag v0.8.0
124- go-simpler.org/sloglint v0.3 .0
124+ go-simpler.org/sloglint v0.4 .0
125125 golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
126126 golang.org/x/tools v0.16.1
127127 gopkg.in/yaml.v3 v3.0.1
@@ -138,7 +138,7 @@ require (
138138 github.com/cespare/xxhash/v2 v2.1.2 // indirect
139139 github.com/chavacava/garif v0.1.0 // indirect
140140 github.com/davecgh/go-spew v1.1.1 // indirect
141- github.com/ettle/strcase v0.1.1 // indirect
141+ github.com/ettle/strcase v0.2.0 // indirect
142142 github.com/fatih/structtag v1.2.0 // indirect
143143 github.com/fsnotify/fsnotify v1.5.4 // indirect
144144 github.com/go-ole/go-ole v1.2.6 // indirect
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ var defaultLintersSettings = LintersSettings{
120120 Qualified : false ,
121121 },
122122 SlogLint : SlogLintSettings {
123+ NoMixedArgs : true ,
123124 KVOnly : false ,
124125 AttrOnly : false ,
125126 ContextOnly : false ,
@@ -753,6 +754,7 @@ type RowsErrCheckSettings struct {
753754}
754755
755756type SlogLintSettings struct {
757+ NoMixedArgs bool `mapstructure:"no-mixed-args"`
756758 KVOnly bool `mapstructure:"kv-only"`
757759 AttrOnly bool `mapstructure:"attr-only"`
758760 ContextOnly bool `mapstructure:"context-only"`
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ func NewSlogLint(settings *config.SlogLintSettings) *goanalysis.Linter {
1212 var opts * sloglint.Options
1313 if settings != nil {
1414 opts = & sloglint.Options {
15+ NoMixedArgs : settings .NoMixedArgs ,
1516 KVOnly : settings .KVOnly ,
1617 AttrOnly : settings .AttrOnly ,
1718 ContextOnly : settings .ContextOnly ,
You can’t perform that action at this time.
0 commit comments