Skip to content

Commit e8a70c6

Browse files
vet: add check to ensure terminating newline (#7645)
1 parent 5fd9853 commit e8a70c6

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

Documentation/grpc-metadata.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ available [here](../examples/features/metadata_interceptor/server/main.go).
241241
[Header]: https://godoc.org/google.golang.org/grpc#Header
242242
[Trailer]: https://godoc.org/google.golang.org/grpc#Trailer
243243
[CallOption]: https://godoc.org/google.golang.org/grpc#CallOption
244-
[metadata]: https://godoc.org/google.golang.org/grpc/metadata
244+
[metadata]: https://godoc.org/google.golang.org/grpc/metadata

examples/data/rbac/policy.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
}
2828
],
2929
"deny_rules": []
30-
}
30+
}

examples/features/name_resolving/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ proper name resolver, this would fail. In the example it picks the `example`
3838
resolver that we installed. The `example` resolver can handle
3939
`resolver.example.grpc.io` correctly by returning the backend address. So even
4040
though the backend IP is not set when ClientConn is created, the connection will
41-
be created to the correct backend.
41+
be created to the correct backend.

reflection/test/grpc_testing_not_regenerate/dynamic.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ message DynamicReq {}
3030
service DynamicService {
3131
// DynamicMessage1 is a test RPC for dynamically constructed protobufs.
3232
rpc DynamicMessage1(DynamicReq) returns (DynamicRes);
33-
}
33+
}

scripts/vet.sh

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ not git grep "\(import \|^\s*\)\"google.golang.org/grpc/interop/grpc_testing" --
7070
# - Ensure that no trailing spaces are found.
7171
not git grep '[[:blank:]]$'
7272

73+
# - Ensure that all files have a terminating newline.
74+
git ls-files | not xargs -I {} sh -c '[ -n "$(tail -c 1 "{}" 2>/dev/null)" ] && echo "{}: No terminating new line found"' | fail_on_output
75+
7376
# - Ensure that no tabs are found in markdown files.
7477
not git grep $'\t' -- '*.md'
7578

testdata/x509/client_with_spiffe_openssl.cnf

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ extendedKeyUsage = critical,clientAuth
1414
subjectAltName = @alt_names
1515

1616
[alt_names]
17-
URI = spiffe://foo.bar.com/client/workload/1
17+
URI = spiffe://foo.bar.com/client/workload/1

0 commit comments

Comments
 (0)