build(deps): bump github.com/jjti/go-spancheck from 0.5.3 to 0.6.0 (#4670)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2024-04-22 20:47:55 +02:00 committed by GitHub
parent 95fc378f0e
commit 1611bca2ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 24 additions and 6 deletions

View File

@ -2051,7 +2051,13 @@ linters-settings:
# Default: []
ignore-check-signatures:
- "telemetry.RecordError"
# A list of regexes for additional function signatures that create spans.
# This is useful if you have a utility method to create spans.
# Each entry should be of the form `<regex>:<telemetry-type>`, where `telemetry-type` can be `opentelemetry` or `opencensus`.
# https://github.com/jjti/go-spancheck#extra-start-span-signatures
# Default: []
extra-start-span-signatures:
- "github.com/user/repo/telemetry/trace.Start:opentelemetry"
staticcheck:
# Deprecated: use the global `run.go` instead.
go: "1.15"

2
go.mod
View File

@ -57,7 +57,7 @@ require (
github.com/jgautheron/goconst v1.7.1
github.com/jingyugao/rowserrcheck v1.1.1
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af
github.com/jjti/go-spancheck v0.5.3
github.com/jjti/go-spancheck v0.6.0
github.com/julz/importas v0.1.0
github.com/karamaru-alpha/copyloopvar v1.1.0
github.com/kisielk/errcheck v1.7.0

4
go.sum generated
View File

@ -305,8 +305,8 @@ github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjz
github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c=
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48=
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0=
github.com/jjti/go-spancheck v0.5.3 h1:vfq4s2IB8T3HvbpiwDTYgVPj1Ze/ZSXrTtaZRTc7CuM=
github.com/jjti/go-spancheck v0.5.3/go.mod h1:eQdOX1k3T+nAKvZDyLC3Eby0La4dZ+I19iOl5NzSPFE=
github.com/jjti/go-spancheck v0.6.0 h1:pOiwyYRdEBfMjsl9TRzxqcpVV2LXKPXynxUmY96PGM8=
github.com/jjti/go-spancheck v0.6.0/go.mod h1:vF1QkOO159prdo6mHRxak2CpzDpHAfKiPUDP/NeRnX8=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=

View File

@ -2337,6 +2337,13 @@
"items": {
"type": "string"
}
},
"extra-start-span-signatures": {
"description": "A list of regexes for additional function signatures that create spans.",
"type": "array",
"items": {
"type": "string"
}
}
}
},

View File

@ -823,8 +823,9 @@ type SlogLintSettings struct {
}
type SpancheckSettings struct {
Checks []string `mapstructure:"checks"`
IgnoreCheckSignatures []string `mapstructure:"ignore-check-signatures"`
Checks []string `mapstructure:"checks"`
IgnoreCheckSignatures []string `mapstructure:"ignore-check-signatures"`
ExtraStartSpanSignatures []string `mapstructure:"extra-start-span-signatures"`
}
type StaticCheckSettings struct {

View File

@ -19,6 +19,10 @@ func New(settings *config.SpancheckSettings) *goanalysis.Linter {
if settings.IgnoreCheckSignatures != nil {
cfg.IgnoreChecksSignaturesSlice = settings.IgnoreCheckSignatures
}
if settings.ExtraStartSpanSignatures != nil {
cfg.StartSpanMatchersSlice = settings.ExtraStartSpanSignatures
}
}
a := spancheck.NewAnalyzerWithConfig(cfg)