From 859602c14c6c8bcc4f3b7e6c129577229c9f9294 Mon Sep 17 00:00:00 2001 From: eshitachandwani <59800922+eshitachandwani@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:01:28 +0530 Subject: [PATCH] vet : add check for tabs in text files (#7678) --- Documentation/benchmark.md | 18 +++++++++--------- scripts/vet.sh | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Documentation/benchmark.md b/Documentation/benchmark.md index 175345c9b656..5d2efda8aa76 100644 --- a/Documentation/benchmark.md +++ b/Documentation/benchmark.md @@ -13,9 +13,9 @@ simulate your application: ```bash $ go run google.golang.org/grpc/benchmark/benchmain/main.go \ -workloads=streaming \ - -reqSizeBytes=1024 \ - -respSizeBytes=1024 \ - -compression=gzip + -reqSizeBytes=1024 \ + -respSizeBytes=1024 \ + -compression=gzip ``` Pass the `-h` flag to the `benchmain` utility to see other flags and workloads @@ -45,8 +45,8 @@ Assume that `benchmain` is invoked like so: ```bash $ go run google.golang.org/grpc/benchmark/benchmain/main.go \ -workloads=unary \ - -reqPayloadCurveFiles=/path/to/csv \ - -respPayloadCurveFiles=/path/to/csv + -reqPayloadCurveFiles=/path/to/csv \ + -respPayloadCurveFiles=/path/to/csv ``` This tells the `benchmain` utility to generate unary RPC requests with a 25% @@ -61,8 +61,8 @@ following command will execute four benchmarks: ```bash $ go run google.golang.org/grpc/benchmark/benchmain/main.go \ -workloads=unary \ - -reqPayloadCurveFiles=/path/to/csv1,/path/to/csv2 \ - -respPayloadCurveFiles=/path/to/csv3,/path/to/csv4 + -reqPayloadCurveFiles=/path/to/csv1,/path/to/csv2 \ + -respPayloadCurveFiles=/path/to/csv3,/path/to/csv4 ``` You may also combine `PayloadCurveFiles` with `SizeBytes` options. For example: @@ -70,6 +70,6 @@ You may also combine `PayloadCurveFiles` with `SizeBytes` options. For example: ``` $ go run google.golang.org/grpc/benchmark/benchmain/main.go \ -workloads=unary \ - -reqPayloadCurveFiles=/path/to/csv \ - -respSizeBytes=1 + -reqPayloadCurveFiles=/path/to/csv \ + -respSizeBytes=1 ``` diff --git a/scripts/vet.sh b/scripts/vet.sh index 7f1ed98cbed0..6431d5c613b7 100755 --- a/scripts/vet.sh +++ b/scripts/vet.sh @@ -70,6 +70,9 @@ not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" -- # - Ensure that no trailing spaces are found. not git grep '[[:blank:]]$' +# - Ensure that no tabs are found in markdown files. +not git grep $'\t' -- '*.md' + # - Ensure all xds proto imports are renamed to *pb or *grpc. git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "'