Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more review comments
Browse files Browse the repository at this point in the history
easwars committed Aug 14, 2024
1 parent cb5bc0a commit f0ab028
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/grpclog/prefix_logger.go
Original file line number Diff line number Diff line change
@@ -67,10 +67,10 @@ func (pl *PrefixLogger) Errorf(format string, args ...any) {

// V reports whether verbosity level l is at least the requested verbose level.
func (pl *PrefixLogger) V(l int) bool {
if pl == nil {
return true
if pl != nil {
return pl.logger.V(l)
}
return pl.logger.V(l)
return true
}

// NewPrefixLogger creates a prefix logger with the given prefix.
9 changes: 8 additions & 1 deletion scripts/vet.sh
Original file line number Diff line number Diff line change
@@ -124,6 +124,13 @@ XXXXX PleaseIgnoreUnused'
# TODO(https://github.com/dominikh/go-tools/issues/54): Remove this once the issue is fixed in staticcheck.
noret_grep "(SA4000)" "${SC_OUT}" | not grep -v -e "crl.go:[0-9]\+:[0-9]\+: identical expressions on the left and right side of the '||' operator (SA4000)"

# Usage of the deprecated Logger interface from prefix_logger.go is the only
# allowed one. If any other files use the deprecated interface, this check
# will fails. Also, note that this same deprecation notice is also added to
# the list of ignored notices down below to allow for the usage in
# prefix_logger.go to not case vet failure.
noret_grep "(SA1019)" "${SC_OUT}" | noret_grep "internal.Logger is deprecated:" | not grep -v -e "grpclog/logger.go"

# Only ignore the following deprecated types/fields/functions and exclude
# generated code.
noret_grep "(SA1019)" "${SC_OUT}" | not grep -Fv 'XXXXX PleaseIgnoreUnused
@@ -140,6 +147,7 @@ XXXXX gRPC internal usage deprecation errors:
: v1alphareflectionpb.
BalancerAttributes is deprecated:
CredsBundle is deprecated:
internal.Logger is deprecated:
Metadata is deprecated: use Attributes instead.
NewSubConn is deprecated:
OverrideServerName is deprecated:
@@ -149,7 +157,6 @@ Target is deprecated: Use the Target field in the BuildOptions instead.
UpdateAddresses is deprecated:
UpdateSubConnState is deprecated:
balancer.ErrTransientFailure is deprecated:
internal.Logger is deprecated:
grpc/reflection/v1alpha/reflection.proto
SwitchTo is deprecated:
XXXXX xDS deprecated fields we support

0 comments on commit f0ab028

Please sign in to comment.