File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ not grep 'func Test[^(]' -- test/*.go
5050git grep ' func (s) ' -- " *_test.go" | not grep -v ' func (s) Test'
5151git grep ' func [A-Z]' -- " *_test.go" | not grep -v ' func Test\|Benchmark\|Example'
5252
53- # - Make sure not context usage are done without timeout.
54- git grep ' context.Background()' -- " *_test.go" | not grep -v ' context.WithTimeout(context.Background()'
53+ # - Make sure all context usages are done timeout.
54+ git grep -e ' context.Background()' --or -e ' context.TODO() ' -- " *_test.go" | not grep -v ' context.WithTimeout(context.Background() ' | not grep -v ' context.WithCancel(context.Background ' | not grep -v ' context.WithTimeOut(context.TODO ()'
5555
5656# - Do not use time.After except in tests. It has the potential to leak the
5757# timer since there is no way to stop it early.
You can’t perform that action at this time.
0 commit comments