Skip to content

Commit

Permalink
build(deps): bump github.com/jjti/go-spancheck from 0.5.3 to 0.6.0 (#…
Browse files Browse the repository at this point in the history
…4670)

Co-authored-by: Fernandez Ludovic <[email protected]>
  • Loading branch information
dependabot[bot] and ldez authored Apr 22, 2024
1 parent 95fc378 commit 1611bca
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
},
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions pkg/golinters/spancheck/spancheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1611bca

Please sign in to comment.