uber-go / goleak

Goroutine leak detector
MIT License
4.48k stars 148 forks source link

ignores: Don't use strings.Contains #112

Closed abhinav closed 10 months ago

abhinav commented 10 months ago

Instead of matching for built-in functions with strings.Contains, use the parsed stack information to match function names exactly.

Following this change, the only remaining strings.Contains are to match on the goroutine state:

% rg strings.Contains
utils_test.go
84:             if strings.Contains(s.State(), "run") {

internal/stack/stacks_test.go
249:            if strings.Contains(s.State(), "run") {

Resolves #41 Depends on #111

codecov[bot] commented 10 months ago

Codecov Report

Merging #112 (78c5017) into master (91de685) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #112   +/-   ##
=======================================
  Coverage   98.50%   98.50%           
=======================================
  Files           6        6           
  Lines         334      334           
=======================================
  Hits          329      329           
  Misses          4        4           
  Partials        1        1           
Files Coverage Δ
options.go 100.00% <100.00%> (ø)
tracestack_new.go 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more