diff --git a/scripts/vet.sh b/scripts/vet.sh index 9a3a9e8064b5..5f7afcf80622 100755 --- a/scripts/vet.sh +++ b/scripts/vet.sh @@ -51,7 +51,7 @@ git grep 'func (s) ' -- "*_test.go" | not grep -v 'func (s) Test' git grep 'func [A-Z]' -- "*_test.go" | not grep -v 'func Test\|Benchmark\|Example' # - Make sure all context usages are done timeout. -git grep -e 'context.Background()' --or -e 'context.TODO()' -- "*_test.go" | grep -v "benchmark/primitives/context_test.go" | grep -v "credentials/google" | grep -v "internal/transport/" | not grep -v 'context.WithTimeout(' | not grep -v 'context.WithCancel(' +git grep -e 'context.Background()' --or -e 'context.TODO()' -- "*_test.go" | grep -v "benchmark/primitives/context_test.go" | grep -v "credentials/google" | grep -v "internal/transport/" | grep -v "xds/internal/" | not grep -v 'context.WithTimeout(' | not grep -v 'context.WithCancel(' # - Do not use time.After except in tests. It has the potential to leak the # timer since there is no way to stop it early.