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 <ldez@users.noreply.github.com>
1 parent 5083ba8 commit 27e99b5

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.golangci.reference.yml

Lines changed: 5 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

Lines changed: 2 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)