Skip to content

Commit

Permalink
fix: spancheck default StartSpanMatchersSlice values
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 15, 2025
1 parent 6d29861 commit 28aea6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/golinters/spancheck/spancheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ func New(settings *config.SpancheckSettings) *goanalysis.Linter {
cfg := spancheck.NewDefaultConfig()

if settings != nil {
if settings.Checks != nil {
if len(settings.Checks) > 0 {
cfg.EnabledChecks = settings.Checks
}

if settings.IgnoreCheckSignatures != nil {
if len(settings.IgnoreCheckSignatures) > 0 {
cfg.IgnoreChecksSignaturesSlice = settings.IgnoreCheckSignatures
}

if settings.ExtraStartSpanSignatures != nil {
cfg.StartSpanMatchersSlice = settings.ExtraStartSpanSignatures
if len(settings.ExtraStartSpanSignatures) > 0 {
cfg.StartSpanMatchersSlice = append(cfg.StartSpanMatchersSlice, settings.ExtraStartSpanSignatures...)
}
}

Expand Down

0 comments on commit 28aea6f

Please sign in to comment.