Skip to content

Commit

Permalink
fix existing trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Aug 30, 2024
1 parent 0ac9760 commit 7a274af
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 74 deletions.
8 changes: 4 additions & 4 deletions authz/grpc_authz_end2end_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ var authzTests = map[string]struct {
"DeniesRPCMatchInDenyNoMatchInAllow": {
authzPolicy: `{
"name": "authz",
"allow_rules":
"allow_rules":
[
{
"name": "allow_StreamingOutputCall",
Expand Down Expand Up @@ -166,11 +166,11 @@ var authzTests = map[string]struct {
"/grpc.testing.TestService/UnaryCall",
"/grpc.testing.TestService/StreamingInputCall"
],
"headers":
"headers":
[
{
"key": "key-abc",
"values":
"values":
[
"val-abc",
"val-def"
Expand Down Expand Up @@ -250,7 +250,7 @@ var authzTests = map[string]struct {
[
{
"name": "allow_StreamingOutputCall",
"request":
"request":
{
"paths":
[
Expand Down
4 changes: 2 additions & 2 deletions authz/grpc_authz_server_interceptors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func (s) TestNewStatic(t *testing.T) {
wantErr: fmt.Errorf(`"name" is not present`),
},
"ValidPolicyCreatesInterceptor": {
authzPolicy: `{
authzPolicy: `{
"name": "authz",
"allow_rules":
"allow_rules":
[
{
"name": "allow_all"
Expand Down
6 changes: 3 additions & 3 deletions cmd/protoc-gen-go-grpc/protoc-gen-go-grpc_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# Uncomment to enable debugging.
# set -x
# set -x

WORKDIR="$(dirname $0)"
TEMPDIR=$(mktemp -d)
Expand All @@ -24,7 +24,7 @@ trap "rm -rf ${TEMPDIR}" EXIT

# Build protoc-gen-go-grpc binary and add to $PATH.
pushd "${WORKDIR}"
go build -o "${TEMPDIR}" .
go build -o "${TEMPDIR}" .
PATH="${TEMPDIR}:${PATH}"
popd

Expand All @@ -38,7 +38,7 @@ GENFILE="${TEMPDIR}/examples/route_guide/routeguide/route_guide_grpc.pb.go"

# diff is piped to [[ $? == 1 ]] to avoid exiting on diff but exit on error
# (like if the file was not found). See man diff for more info.
DIFF=$(diff "${GOLDENFILE}" "${GENFILE}" || [[ $? == 1 ]])
DIFF=$(diff "${GOLDENFILE}" "${GENFILE}" || [[ $? == 1 ]])
if [[ -n "${DIFF}" ]]; then
echo -e "ERROR: Generated file differs from golden file:\n${DIFF}"
echo -e "If you have made recent changes to protoc-gen-go-grpc," \
Expand Down
10 changes: 5 additions & 5 deletions examples/features/advancedtls/creds/client_cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Certificate:
6e:bb:bb
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
DE:03:BD:A3:0E:63:F4:97:C2:52:70:63:E8:BE:A9:DF:F1:9A:7B:56
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
50:76:C3:5C:6B:12:E1:92:0F:28:F8:F2:43:A6:80:C2:9C:E8:56:D6
X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:localhost, IP Address:0.0.0.0
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
Expand Down
10 changes: 5 additions & 5 deletions examples/features/advancedtls/creds/client_cert_revoked.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Certificate:
6e:bb:bb
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
DE:03:BD:A3:0E:63:F4:97:C2:52:70:63:E8:BE:A9:DF:F1:9A:7B:56
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
50:76:C3:5C:6B:12:E1:92:0F:28:F8:F2:43:A6:80:C2:9C:E8:56:D6
X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:localhost, IP Address:0.0.0.0
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
Expand Down
10 changes: 5 additions & 5 deletions examples/features/advancedtls/creds/server_cert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Certificate:
03:71:c1
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
4C:57:E2:72:97:CF:DC:C4:B8:4E:DB:D4:C1:C6:3D:AE:EF:D7:0A:19
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
50:76:C3:5C:6B:12:E1:92:0F:28:F8:F2:43:A6:80:C2:9C:E8:56:D6
X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:localhost, IP Address:0.0.0.0
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
Expand Down
10 changes: 5 additions & 5 deletions examples/features/advancedtls/creds/server_cert_revoked.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ Certificate:
03:71:c1
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
4C:57:E2:72:97:CF:DC:C4:B8:4E:DB:D4:C1:C6:3D:AE:EF:D7:0A:19
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
50:76:C3:5C:6B:12:E1:92:0F:28:F8:F2:43:A6:80:C2:9C:E8:56:D6
X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:localhost, IP Address:0.0.0.0
Signature Algorithm: sha256WithRSAEncryption
Signature Value:
Expand Down
8 changes: 2 additions & 6 deletions scripts/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ revive -formatter plain ./... >"${REV_OUT}" || true
# TODO: Remove `|| true` to unskip linter failures once existing issues are fixed.
(noret_grep -v "unused-parameter" "${REV_OUT}" | not grep -v "\.pb\.go:") || true

# Collection of trailing spaces analysis checks
TRAIL_SPACE_OUT="$(mktemp)"
find . -type f -exec grep -Hn "[[:blank:]]$" {} \; >"${TRAIL_SPACE_OUT}"

# Error for anything other than in .git directory, vendor directory and *.md files.
noret_grep -v "./.git" "${TRAIL_SPACE_OUT}" | noret_grep -v "vendor" | not grep -v ".md"
# Error if trailing spaces found in any files excluding files in .git directory and *.md files
$(find . -path ./.git -prune -o -type f ! -name "*.md" -exec grep -Hn "[[:blank:]]$" {} \;) | fail_on_output

echo SUCCESS
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/another_client_cert_1.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
55:60:25
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
D5:43:51:8B:A8:4C:84:D0:C8:DE:29:14:1B:15:7A:62:01:ED:FF:EC
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:B4:19:08:1C:FC:10:23:C5:30:86:22:BC:CB:B1:5F:AD:EA:7A:5D:F1

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
61:a0:89:19:3e:e8:3d:35:bf:6e:5d:0c:d0:ec:36:85:d4:27:
Expand Down
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/client_cert_1.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
10:5f:bd
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
7F:9D:9C:C6:86:DF:9E:07:93:94:EF:18:2D:0A:0A:50:AA:1F:A2:B7
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:B4:19:08:1C:FC:10:23:C5:30:86:22:BC:CB:B1:5F:AD:EA:7A:5D:F1

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
31:b0:6d:25:5e:8e:9b:73:01:ac:08:b9:a6:70:8e:de:18:fd:
Expand Down
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/client_cert_2.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
f4:2a:0b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
E0:27:7D:90:FC:81:7F:F3:EE:97:CE:65:A2:AD:D2:1E:CC:D5:2B:0F
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:63:88:EA:4D:D0:3E:EF:5E:F8:43:91:75:40:E4:16:AB:15:B3:32:B9

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
8c:81:8f:65:38:2c:db:69:34:26:47:62:b7:5d:4e:67:41:c2:
Expand Down
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/server_cert_1.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
17:b4:4b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
C0:82:DA:FA:69:46:30:AE:FF:6F:CD:BB:93:49:94:A6:D0:E2:17:EB
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:5A:A5:DA:B1:99:D4:E5:0E:E6:1E:94:EA:FF:FC:62:E2:ED:09:F1:06

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
36:fd:cf:ec:f5:20:4b:52:dc:2e:38:f3:92:b1:e4:b6:a1:06:
Expand Down
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/server_cert_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
17:b4:4b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
C0:82:DA:FA:69:46:30:AE:FF:6F:CD:BB:93:49:94:A6:D0:E2:17:EB
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:5A:A5:DA:B1:99:D4:E5:0E:E6:1E:94:EA:FF:FC:62:E2:ED:09:F1:06

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
36:fd:cf:ec:f5:20:4b:52:dc:2e:38:f3:92:b1:e4:b6:a1:06:
Expand Down
8 changes: 4 additions & 4 deletions security/advancedtls/testdata/server_cert_2.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
52:25:f3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
74:BD:18:0B:32:AF:D0:51:8E:4C:4C:8D:B2:F6:4E:B8:6D:AB:BD:BA
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:01:74:A9:44:61:3D:7A:BB:C2:32:CD:D0:ED:20:DA:3A:C4:C6:02:E8

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
b5:63:0c:d8:ed:af:74:2d:4c:94:36:41:05:2a:f2:ef:45:e5:
Expand Down
9 changes: 4 additions & 5 deletions security/advancedtls/testdata/server_cert_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ Certificate:
52:25:f3
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
74:BD:18:0B:32:AF:D0:51:8E:4C:4C:8D:B2:F6:4E:B8:6D:AB:BD:BA
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:01:74:A9:44:61:3D:7A:BB:C2:32:CD:D0:ED:20:DA:3A:C4:C6:02:E8

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
Signature Algorithm: sha256WithRSAEncryption
b5:63:0c:d8:ed:af:74:2d:4c:94:36:41:05:2a:f2:ef:45:e5:
Expand Down Expand Up @@ -88,4 +88,3 @@ Certificate:
1d:b5:cc:6f:14:21:c4:89:07:9b:81:1d:9a:79:ff:bf:fd:ce:
e4:77:11:0f:47:21:dc:d9:79:f3:40:26:56:5c:b4:86:32:8e:
28:b9:14:e7:b3:fe:86:47

8 changes: 4 additions & 4 deletions security/advancedtls/testdata/server_cert_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Certificate:
ac:cd
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:6E:1B:8B:C9:34:74:E7:7B:8D:2A:4F:41:0E:98:50:30:14:01:16:B1

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:google.com, DNS:apple.com, DNS:amazon.com
Signature Algorithm: sha256WithRSAEncryption
9f:96:96:1c:41:cd:4c:39:9c:80:2d:b9:a0:4b:42:8f:e2:24:
Expand Down
10 changes: 5 additions & 5 deletions security/advancedtls/testdata/server_cert_localhost_1.pem
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ Certificate:
41:ba:07
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
X509v3 Subject Key Identifier:
F3:DC:6A:5B:B7:CE:E9:E1:4D:3E:C4:AE:B7:8E:39:E3:6D:CA:AF:C7
X509v3 Authority Key Identifier:
X509v3 Authority Key Identifier:
keyid:5A:A5:DA:B1:99:D4:E5:0E:E6:1E:94:EA:FF:FC:62:E2:ED:09:F1:06

X509v3 Basic Constraints:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Key Usage:
X509v3 Key Usage:
Digital Signature, Key Encipherment
X509v3 Subject Alternative Name:
X509v3 Subject Alternative Name:
DNS:localhost
Signature Algorithm: sha256WithRSAEncryption
54:13:3d:55:d3:4b:d8:85:f0:54:a8:33:5c:a1:9f:87:79:31:
Expand Down
2 changes: 1 addition & 1 deletion xds/internal/test/e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
mkdir binaries
go build -o ./binaries/client ../../../../interop/xds/client/
go build -o ./binaries/server ../../../../interop/xds/server/
go test .
go test .

0 comments on commit 7a274af

Please sign in to comment.