Skip to content

Commit 30c0cdd

Browse files
authored
vet: remove --quiet from git grep when output is expected (#7305)
1 parent 5a289d9 commit 30c0cdd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

scripts/vet.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,31 @@ fi
4343
(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output
4444

4545
# - Make sure all tests in grpc and grpc/test use leakcheck via Teardown.
46-
not grep 'func Test[^(]' *_test.go
47-
not grep 'func Test[^(]' test/*.go
46+
not grep 'func Test[^(]' -- *_test.go
47+
not grep 'func Test[^(]' -- test/*.go
4848

4949
# - Check for typos in test function names
50-
git grep --quiet 'func (s) ' -- "*_test.go" | not grep -v 'func (s) Test'
51-
git grep --quiet 'func [A-Z]' -- "*_test.go" | not grep -v 'func Test\|Benchmark\|Example'
50+
git grep 'func (s) ' -- "*_test.go" | not grep -v 'func (s) Test'
51+
git grep 'func [A-Z]' -- "*_test.go" | not grep -v 'func Test\|Benchmark\|Example'
5252

5353
# - Do not use time.After except in tests. It has the potential to leak the
5454
# timer since there is no way to stop it early.
55-
git grep --quiet -l 'time.After(' -- "*.go" | not grep -v '_test.go\|test_utils\|testutils'
55+
git grep -l 'time.After(' -- "*.go" | not grep -v '_test.go\|test_utils\|testutils'
5656

5757
# - Do not use "interface{}"; use "any" instead.
58-
git grep --quiet -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc\|grpc_testing_not_regenerate'
58+
git grep -l 'interface{}' -- "*.go" 2>&1 | not grep -v '\.pb\.go\|protoc-gen-go-grpc\|grpc_testing_not_regenerate'
5959

6060
# - Do not call grpclog directly. Use grpclog.Component instead.
61-
git grep --quiet -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
61+
git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
6262

6363
# - Ensure that the deprecated protobuf dependency is not used.
64-
not git grep --quiet "\"github.com/golang/protobuf/*" -- "*.go" ':(exclude)reflection/test/grpc_testing_not_regenerate/*'
64+
not git grep "\"github.com/golang/protobuf/*" -- "*.go" ':(exclude)reflection/test/grpc_testing_not_regenerate/*'
6565

6666
# - Ensure all usages of grpc_testing package are renamed when importing.
67-
not git grep --quiet "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go"
67+
not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- "*.go"
6868

6969
# - Ensure all xds proto imports are renamed to *pb or *grpc.
70-
git grep --quiet '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "'
70+
git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "'
7171

7272
misspell -error .
7373

0 commit comments

Comments
 (0)