Closed Abirdcfly closed 2 years ago
The result of running on the istio
project shows that if all duplicate words are detected, you need to manually determine whether the duplicate here is a bug or not.
$ cd istio.io/istio
$ git fetch upstream
$ git reset --hard upstream/master
HEAD 现在位于 1949d4c269 Quick fix to get builds working on a Mac (#40912)
$ dupword ./...
/Users/xxx/go/src/istio.io/istio/cni/pkg/repair/repair_test_helpers.go:86:14: Duplicate words (blah) found
/Users/xxx/go/src/istio.io/istio/pkg/config/validation/validation.go:3773:27: Duplicate words (set) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/model/addressmap.go:116:3: Duplicate words (if) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/model/context.go:500:2: Duplicate words (of) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/model/telemetry.go:172:1: Duplicate words (namespace,) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/gateway.go:1028:2: Duplicate words (we) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/xds/debug.go:431:1: Duplicate words (is) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/xds/nds.go:26:1: Duplicate words (istiod) found
/Users/xxx/go/src/istio.io/istio/pkg/istio-agent/xds_proxy.go:299:1: Duplicate words (API) found
/Users/xxx/go/src/istio.io/istio/security/pkg/server/ca/authenticate/kubeauth/kube_jwt.go:124:2: Duplicate words (in) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/model/test/mockopenidserver.go:90:2: Duplicate words (error,,success,) found
/Users/xxx/go/src/istio.io/istio/pkg/test/framework/components/environment/kube/flags.go:202:27: Duplicate words (mapping) found
/Users/xxx/go/src/istio.io/istio/cni/pkg/log/uds_test.go:70:3: Duplicate words (debug) found
/Users/xxx/go/src/istio.io/istio/cni/pkg/repair/repair_test.go:50:16: Duplicate words (blah) found
/Users/xxx/go/src/istio.io/istio/istioctl/cmd/istiodconfig_test.go:30:37: Duplicate words (ads) found
/Users/xxx/go/src/istio.io/istio/operator/cmd/mesh/profile-diff_test.go:54:32: Duplicate words (default) found
/Users/xxx/go/src/istio.io/istio/operator/cmd/mesh/profile-diff_test.go:58:32: Duplicate words (demo) found
/Users/xxx/go/src/istio.io/istio/operator/cmd/mesh/profile-diff_test.go:62:32: Duplicate words (openshift) found
/Users/xxx/go/src/istio.io/istio/operator/pkg/util/util_test.go:116:10: Duplicate words (err3) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/cluster_test.go:931:70: Duplicate words (outbound) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/cluster_test.go:1194:2: Duplicate words (failover) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/cluster_test.go:2795:2: Duplicate words (if) found
/Users/xxx/go/src/istio.io/istio/pilot/pkg/networking/core/v1alpha3/listener_test.go:1107:17: Duplicate words (found) found
/Users/xxx/go/src/istio.io/istio/pkg/config/validation/validation_test.go:7778:5: Duplicate words (this) found
/Users/xxx/go/src/istio.io/istio/pkg/config/validation/validation_test.go:7657:4: Duplicate words (set) found
/Users/xxx/go/src/istio.io/istio/security/pkg/nodeagent/sds/sdsservice_test.go:213:3: Duplicate words (get) found
IMO, 14/26 duplicate words is correct, 12/26 duplicate words should be fixed
.
is better).
is better)
source
%s %s
is not considered a duplicate.