build(deps): bump go-simpler.org/sloglint from 0.4.0 to 0.5.0 (#4523)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-03-17 15:51:05 +01:00 committed by GitHub
parent 8f3027c631
commit 2c0a8ee50e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 3 deletions

View File

@ -1982,6 +1982,9 @@ linters-settings:
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
# Default: false
kv-only: true
# Enforce not using global loggers.
# Default: default
no-global: all
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# Default: false
attr-only: true

2
go.mod
View File

@ -117,7 +117,7 @@ require (
github.com/ykadowak/zerologlint v0.1.5
gitlab.com/bosi/decorder v0.4.1
go-simpler.org/musttag v0.9.0
go-simpler.org/sloglint v0.4.0
go-simpler.org/sloglint v0.5.0
go.uber.org/automaxprocs v1.5.3
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
golang.org/x/tools v0.19.0

4
go.sum generated
View File

@ -586,8 +586,8 @@ go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA=
go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28=
go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos=
go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4=
go-simpler.org/sloglint v0.4.0 h1:UVJuUJo63iNQNFEOtZ6o1xAgagVg/giVLLvG9nNLobI=
go-simpler.org/sloglint v0.4.0/go.mod h1:v6zJ++j/thFPhefs2wEXoCKwT10yo5nkBDYRCXyqgNQ=
go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY=
go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=

View File

@ -2284,6 +2284,11 @@
"type": "boolean",
"default": false
},
"no-global": {
"description": "Enforce not using global loggers.",
"enum": ["all", "default"],
"default": "default"
},
"no-mixed-args": {
"description": "Enforce not mixing key-value pairs and attributes.",
"type": "boolean",

View File

@ -793,6 +793,7 @@ type RowsErrCheckSettings struct {
type SlogLintSettings struct {
NoMixedArgs bool `mapstructure:"no-mixed-args"`
KVOnly bool `mapstructure:"kv-only"`
NoGlobal string `mapstructure:"no-global"`
AttrOnly bool `mapstructure:"attr-only"`
ContextOnly bool `mapstructure:"context-only"`
StaticMsg bool `mapstructure:"static-msg"`

View File

@ -14,6 +14,7 @@ func NewSlogLint(settings *config.SlogLintSettings) *goanalysis.Linter {
opts = &sloglint.Options{
NoMixedArgs: settings.NoMixedArgs,
KVOnly: settings.KVOnly,
NoGlobal: settings.NoGlobal,
AttrOnly: settings.AttrOnly,
ContextOnly: settings.ContextOnly,
StaticMsg: settings.StaticMsg,