Skip to content

Commit

Permalink
Fixed linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemkaaas committed Nov 2, 2024
1 parent 4b5d428 commit b819dcb
Show file tree
Hide file tree
Showing 64 changed files with 386 additions and 399 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.4
golang.org/x/tools v0.6.0
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917
google.golang.org/grpc v1.60.1
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
Expand Down Expand Up @@ -206,7 +207,6 @@ require (
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/api v0.149.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ message GenesisState {
repeated NocIcaCertificates nocIcaCertificatesList = 15 [(gogoproto.nullable) = false];
repeated RevokedNocRootCertificates revokedNocRootCertificatesList = 16 [(gogoproto.nullable) = false];
repeated NocCertificatesByVidAndSkid nocCertificatesByVidAndSkidList = 17 [(gogoproto.nullable) = false];
repeated NocCertificatesBySubjectKeyId nocCertificatesBySubjectKeyIdList = 18 [(gogoproto.nullable) = false];
repeated NocCertificatesBySubjectKeyID NocCertificatesBySubjectKeyIDList = 18 [(gogoproto.nullable) = false];
repeated NocCertificates nocCertificatesList = 19 [(gogoproto.nullable) = false];
repeated NocCertificatesBySubject nocCertificatesBySubjectList = 20 [(gogoproto.nullable) = false];
repeated AllCertificates certificatesList = 21 [(gogoproto.nullable) = false];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ option go_package = "github.com/zigbee-alliance/distributed-compliance-ledger/x/

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

message NocCertificatesBySubjectKeyId {
message NocCertificatesBySubjectKeyID {
string subjectKeyId = 1;
repeated Certificate certs = 2;
float tq = 3;
Expand Down
1 change: 1 addition & 0 deletions tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
_ "golang.org/x/tools/cmd/goimports"
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
)
20 changes: 10 additions & 10 deletions x/compliance/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions x/dclauth/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions x/dclupgrade/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions x/model/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions x/pki/client/cli/query_approved_certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func networkWithApprovedCertificatesObjects(t *testing.T, n int) (*network.Netwo
for i := 0; i < n; i++ {
approvedCertificates := types.ApprovedCertificates{
Subject: strconv.Itoa(i),
SubjectKeyId: strconv.Itoa(i),
SubjectKeyID: strconv.Itoa(i),
}
nullify.Fill(&approvedCertificates)
state.ApprovedCertificatesList = append(state.ApprovedCertificatesList, approvedCertificates)
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestShowApprovedCertificates(t *testing.T) {
{
desc: "found",
idSubject: objs[0].Subject,
idSubjectKeyId: objs[0].SubjectKeyId,
idSubjectKeyId: objs[0].SubjectKeyID,
args: common,
obj: objs[0],
Expand Down
6 changes: 3 additions & 3 deletions x/pki/client/cli/query_noc_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ func CmdShowNocCertificates() *cobra.Command {
&res,
)
}
var res types.NocCertificatesBySubjectKeyId
var res types.NocCertificatesBySubjectKeyID

return cli.QueryWithProof(
clientCtx,
pkitypes.StoreKey,
types.NocCertificatesBySubjectKeyIdKeyPrefix,
types.NocCertificatesBySubjectKeyIdKey(subjectKeyID),
types.NocCertificatesBySubjectKeyIDKeyPrefix,
types.NocCertificatesBySubjectKeyIDKey(subjectKeyID),
&res,
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func networkWithProposedCertificateRevocationObjects(t *testing.T, n int) (*netw
for i := 0; i < n; i++ {
proposedCertificateRevocation := types.ProposedCertificateRevocation{
Subject: strconv.Itoa(i),
SubjectKeyId: strconv.Itoa(i),
SubjectKeyID: strconv.Itoa(i),
}
nullify.Fill(&proposedCertificateRevocation)
state.ProposedCertificateRevocationList = append(state.ProposedCertificateRevocationList, proposedCertificateRevocation)
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestShowProposedCertificateRevocation(t *testing.T) {
{
desc: "found",
idSubject: objs[0].Subject,
idSubjectKeyId: objs[0].SubjectKeyId,
idSubjectKeyId: objs[0].SubjectKeyID,
args: common,
obj: objs[0],
Expand Down
4 changes: 2 additions & 2 deletions x/pki/client/cli/query_proposed_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func networkWithProposedCertificateObjects(t *testing.T, n int) (*network.Networ
for i := 0; i < n; i++ {
proposedCertificate := types.ProposedCertificate{
Subject: strconv.Itoa(i),
SubjectKeyId: strconv.Itoa(i),
SubjectKeyID: strconv.Itoa(i),
}
nullify.Fill(&proposedCertificate)
state.ProposedCertificateList = append(state.ProposedCertificateList, proposedCertificate)
Expand Down Expand Up @@ -60,7 +60,7 @@ func TestShowProposedCertificate(t *testing.T) {
{
desc: "found",
idSubject: objs[0].Subject,
idSubjectKeyId: objs[0].SubjectKeyId,
idSubjectKeyId: objs[0].SubjectKeyID,
args: common,
obj: objs[0],
Expand Down
4 changes: 2 additions & 2 deletions x/pki/client/cli/query_rejected_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func networkWithRejectedCertificateObjects(t *testing.T, n int) (*network.Networ
for i := 0; i < n; i++ {
rejectedCertificate := types.RejectedCertificate{
Subject: strconv.Itoa(i),
SubjectKeyId: strconv.Itoa(i),
SubjectKeyID: strconv.Itoa(i),
}
nullify.Fill(&rejectedCertificate)
state.RejectedCertificateList = append(state.RejectedCertificateList, rejectedCertificate)
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestShowRejectedCertificate(t *testing.T) {
{
desc: "found",
idSubject: objs[0].Subject,
idSubjectKeyID: objs[0].SubjectKeyId,
idSubjectKeyID: objs[0].SubjectKeyID,
args: common,
obj: objs[0],
Expand Down
Loading

0 comments on commit b819dcb

Please sign in to comment.