Skip to content

Commit b819dcb

Browse files
committed
Fixed linter errors
1 parent 4b5d428 commit b819dcb

File tree

64 files changed

+386
-399
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+386
-399
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ require (
2727
github.com/spf13/pflag v1.0.5
2828
github.com/spf13/viper v1.14.0
2929
github.com/stretchr/testify v1.8.4
30+
golang.org/x/tools v0.6.0
3031
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917
3132
google.golang.org/grpc v1.60.1
3233
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
@@ -206,7 +207,6 @@ require (
206207
golang.org/x/sys v0.16.0 // indirect
207208
golang.org/x/term v0.15.0 // indirect
208209
golang.org/x/text v0.14.0 // indirect
209-
golang.org/x/tools v0.6.0 // indirect
210210
google.golang.org/api v0.149.0 // indirect
211211
google.golang.org/appengine v1.6.8 // indirect
212212
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect

proto/zigbeealliance/distributedcomplianceledger/pki/genesis.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ message GenesisState {
4747
repeated NocIcaCertificates nocIcaCertificatesList = 15 [(gogoproto.nullable) = false];
4848
repeated RevokedNocRootCertificates revokedNocRootCertificatesList = 16 [(gogoproto.nullable) = false];
4949
repeated NocCertificatesByVidAndSkid nocCertificatesByVidAndSkidList = 17 [(gogoproto.nullable) = false];
50-
repeated NocCertificatesBySubjectKeyId nocCertificatesBySubjectKeyIdList = 18 [(gogoproto.nullable) = false];
50+
repeated NocCertificatesBySubjectKeyID NocCertificatesBySubjectKeyIDList = 18 [(gogoproto.nullable) = false];
5151
repeated NocCertificates nocCertificatesList = 19 [(gogoproto.nullable) = false];
5252
repeated NocCertificatesBySubject nocCertificatesBySubjectList = 20 [(gogoproto.nullable) = false];
5353
repeated AllCertificates certificatesList = 21 [(gogoproto.nullable) = false];

proto/zigbeealliance/distributedcomplianceledger/pki/noc_certificates_by_subject_key_id.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/
55

66
import "zigbeealliance/distributedcomplianceledger/pki/certificate.proto";
77

8-
message NocCertificatesBySubjectKeyId {
8+
message NocCertificatesBySubjectKeyID {
99
string subjectKeyId = 1;
1010
repeated Certificate certs = 2;
1111
float tq = 3;

tools/tools.go

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway"
1111
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
1212
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
13+
_ "golang.org/x/tools/cmd/goimports"
1314
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
1415
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
1516
)

x/compliance/types/query.pb.gw.go

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/dclauth/types/query.pb.gw.go

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/dclupgrade/types/query.pb.gw.go

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/model/types/query.pb.gw.go

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x/pki/client/cli/query_approved_certificates_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func networkWithApprovedCertificatesObjects(t *testing.T, n int) (*network.Netwo
3030
for i := 0; i < n; i++ {
3131
approvedCertificates := types.ApprovedCertificates{
3232
Subject: strconv.Itoa(i),
33-
SubjectKeyId: strconv.Itoa(i),
33+
SubjectKeyID: strconv.Itoa(i),
3434
}
3535
nullify.Fill(&approvedCertificates)
3636
state.ApprovedCertificatesList = append(state.ApprovedCertificatesList, approvedCertificates)
@@ -60,7 +60,7 @@ func TestShowApprovedCertificates(t *testing.T) {
6060
{
6161
desc: "found",
6262
idSubject: objs[0].Subject,
63-
idSubjectKeyId: objs[0].SubjectKeyId,
63+
idSubjectKeyId: objs[0].SubjectKeyID,
6464
6565
args: common,
6666
obj: objs[0],

x/pki/client/cli/query_noc_certificates.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ func CmdShowNocCertificates() *cobra.Command {
7878
&res,
7979
)
8080
}
81-
var res types.NocCertificatesBySubjectKeyId
81+
var res types.NocCertificatesBySubjectKeyID
8282

8383
return cli.QueryWithProof(
8484
clientCtx,
8585
pkitypes.StoreKey,
86-
types.NocCertificatesBySubjectKeyIdKeyPrefix,
87-
types.NocCertificatesBySubjectKeyIdKey(subjectKeyID),
86+
types.NocCertificatesBySubjectKeyIDKeyPrefix,
87+
types.NocCertificatesBySubjectKeyIDKey(subjectKeyID),
8888
&res,
8989
)
9090
},

x/pki/client/cli/query_proposed_certificate_revocation_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func networkWithProposedCertificateRevocationObjects(t *testing.T, n int) (*netw
3030
for i := 0; i < n; i++ {
3131
proposedCertificateRevocation := types.ProposedCertificateRevocation{
3232
Subject: strconv.Itoa(i),
33-
SubjectKeyId: strconv.Itoa(i),
33+
SubjectKeyID: strconv.Itoa(i),
3434
}
3535
nullify.Fill(&proposedCertificateRevocation)
3636
state.ProposedCertificateRevocationList = append(state.ProposedCertificateRevocationList, proposedCertificateRevocation)
@@ -60,7 +60,7 @@ func TestShowProposedCertificateRevocation(t *testing.T) {
6060
{
6161
desc: "found",
6262
idSubject: objs[0].Subject,
63-
idSubjectKeyId: objs[0].SubjectKeyId,
63+
idSubjectKeyId: objs[0].SubjectKeyID,
6464
6565
args: common,
6666
obj: objs[0],

x/pki/client/cli/query_proposed_certificate_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func networkWithProposedCertificateObjects(t *testing.T, n int) (*network.Networ
3030
for i := 0; i < n; i++ {
3131
proposedCertificate := types.ProposedCertificate{
3232
Subject: strconv.Itoa(i),
33-
SubjectKeyId: strconv.Itoa(i),
33+
SubjectKeyID: strconv.Itoa(i),
3434
}
3535
nullify.Fill(&proposedCertificate)
3636
state.ProposedCertificateList = append(state.ProposedCertificateList, proposedCertificate)
@@ -60,7 +60,7 @@ func TestShowProposedCertificate(t *testing.T) {
6060
{
6161
desc: "found",
6262
idSubject: objs[0].Subject,
63-
idSubjectKeyId: objs[0].SubjectKeyId,
63+
idSubjectKeyId: objs[0].SubjectKeyID,
6464
6565
args: common,
6666
obj: objs[0],

x/pki/client/cli/query_rejected_certificate_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func networkWithRejectedCertificateObjects(t *testing.T, n int) (*network.Networ
3131
for i := 0; i < n; i++ {
3232
rejectedCertificate := types.RejectedCertificate{
3333
Subject: strconv.Itoa(i),
34-
SubjectKeyId: strconv.Itoa(i),
34+
SubjectKeyID: strconv.Itoa(i),
3535
}
3636
nullify.Fill(&rejectedCertificate)
3737
state.RejectedCertificateList = append(state.RejectedCertificateList, rejectedCertificate)
@@ -62,7 +62,7 @@ func TestShowRejectedCertificate(t *testing.T) {
6262
{
6363
desc: "found",
6464
idSubject: objs[0].Subject,
65-
idSubjectKeyID: objs[0].SubjectKeyId,
65+
idSubjectKeyID: objs[0].SubjectKeyID,
6666
6767
args: common,
6868
obj: objs[0],

0 commit comments

Comments
 (0)