vet: add check to ensure terminating newline (#7645)

This commit is contained in:
eshitachandwani 2024-10-07 23:04:22 +05:30 committed by GitHub
parent 5fd98530cf
commit e8a70c6c71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 5 deletions

View File

@ -241,4 +241,4 @@ available [here](../examples/features/metadata_interceptor/server/main.go).
[Header]: https://godoc.org/google.golang.org/grpc#Header
[Trailer]: https://godoc.org/google.golang.org/grpc#Trailer
[CallOption]: https://godoc.org/google.golang.org/grpc#CallOption
[metadata]: https://godoc.org/google.golang.org/grpc/metadata
[metadata]: https://godoc.org/google.golang.org/grpc/metadata

View File

@ -27,4 +27,4 @@
}
],
"deny_rules": []
}
}

View File

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

View File

@ -30,4 +30,4 @@ message DynamicReq {}
service DynamicService {
// DynamicMessage1 is a test RPC for dynamically constructed protobufs.
rpc DynamicMessage1(DynamicReq) returns (DynamicRes);
}
}

View File

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

View File

@ -14,4 +14,4 @@ extendedKeyUsage = critical,clientAuth
subjectAltName = @alt_names
[alt_names]
URI = spiffe://foo.bar.com/client/workload/1
URI = spiffe://foo.bar.com/client/workload/1