File tree 5 files changed +14
-8
lines changed
5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -1855,10 +1855,13 @@ linters-settings:
1855
1855
- github.com/jmoiron/sqlx
1856
1856
1857
1857
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).
1859
1862
# Default: false
1860
1863
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).
1862
1865
# Default: false
1863
1866
attr-only : true
1864
1867
# Enforce using methods that accept a context.
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ require (
121
121
github.com/ykadowak/zerologlint v0.1.5
122
122
gitlab.com/bosi/decorder v0.4.1
123
123
go-simpler.org/musttag v0.8.0
124
- go-simpler.org/sloglint v0.3 .0
124
+ go-simpler.org/sloglint v0.4 .0
125
125
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
126
126
golang.org/x/tools v0.16.1
127
127
gopkg.in/yaml.v3 v3.0.1
@@ -138,7 +138,7 @@ require (
138
138
github.com/cespare/xxhash/v2 v2.1.2 // indirect
139
139
github.com/chavacava/garif v0.1.0 // indirect
140
140
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
142
142
github.com/fatih/structtag v1.2.0 // indirect
143
143
github.com/fsnotify/fsnotify v1.5.4 // indirect
144
144
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{
120
120
Qualified : false ,
121
121
},
122
122
SlogLint : SlogLintSettings {
123
+ NoMixedArgs : true ,
123
124
KVOnly : false ,
124
125
AttrOnly : false ,
125
126
ContextOnly : false ,
@@ -753,6 +754,7 @@ type RowsErrCheckSettings struct {
753
754
}
754
755
755
756
type SlogLintSettings struct {
757
+ NoMixedArgs bool `mapstructure:"no-mixed-args"`
756
758
KVOnly bool `mapstructure:"kv-only"`
757
759
AttrOnly bool `mapstructure:"attr-only"`
758
760
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 {
12
12
var opts * sloglint.Options
13
13
if settings != nil {
14
14
opts = & sloglint.Options {
15
+ NoMixedArgs : settings .NoMixedArgs ,
15
16
KVOnly : settings .KVOnly ,
16
17
AttrOnly : settings .AttrOnly ,
17
18
ContextOnly : settings .ContextOnly ,
You can’t perform that action at this time.
0 commit comments