Skip to content

Commit 27e99b5

Browse files
build(deps): bump go-simpler.org/sloglint from 0.3.0 to 0.4.0 (#4257)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 5083ba8 commit 27e99b5

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.golangci.reference.yml

+5-2
Original file line numberDiff line numberDiff 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.

go.mod

+2-2
Original file line numberDiff line numberDiff 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

go.sum

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+2
Original file line numberDiff line numberDiff 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

755756
type 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"`

pkg/golinters/sloglint.go

+1
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)