Fix proto format (#9279)

* makefile: fix proto-format

* reformat all proto files

* regenerating proto

* remove dangling semicolon
This commit is contained in:
Robert Zaremba 2021-05-07 23:33:17 +02:00 committed by GitHub
parent 1986104ef4
commit 3e4d81c3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 42 additions and 37 deletions

View File

@ -394,8 +394,9 @@ proto-swagger-gen:
proto-format:
@echo "Formatting Protobuf files"
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace $(containerProtoImage) \
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {}; fi
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; ; fi
proto-lint:
@$(DOCKER_BUF) lint --error-format=json

View File

@ -2693,7 +2693,8 @@ between a store name and the commit ID.
### StoreKVPair
StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
Deletes
| Field | Type | Label | Description |
@ -7590,7 +7591,7 @@ TxBody is the body of a transaction that all signers sign over.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. |
| `memo` | [string](#string) | | memo is any arbitrary note/comment to be added to the transaction. In clients, any public exposing text should not be called as memo, should use `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). |
| `memo` | [string](#string) | | memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). |
| `timeout_height` | [uint64](#uint64) | | timeout is the block height after which this transaction will not be processed by the chain |
| `extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected |
| `non_critical_extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored |

View File

@ -49,7 +49,7 @@ message MsgExec {
// Authorization Msg requests to execute. Each msg must implement Authorization interface
// The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg))
// triple and validate it.
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"];;
repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"];
}
// MsgGrantResponse defines the Msg/MsgGrant response type.

View File

@ -69,7 +69,8 @@ message CodecDescriptor {
message InterfaceDescriptor {
// fullname is the name of the interface
string fullname = 1;
// interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
// google.protobuf.Any field
repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2;
// interface_implementers is a list of the descriptors of the interface implementers
repeated InterfaceImplementerDescriptor interface_implementers = 3;
@ -188,7 +189,6 @@ message GetTxDescriptorResponse {
TxDescriptor tx = 1;
}
// QueryServicesDescriptor contains the list of cosmos-sdk queriable services
message QueryServicesDescriptor {
// query_services is a list of cosmos-sdk QueryServiceDescriptor

View File

@ -4,7 +4,8 @@ package cosmos.base.store.v1beta1;
option go_package = "github.com/cosmos/cosmos-sdk/store/types";
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
// Deletes
message StoreKVPair {
string store_key = 1; // the store key for the KVStore this pair originates from
bool delete = 2; // true indicates a delete operation, false indicates a set operation

View File

@ -388,7 +388,8 @@ func (m *CodecDescriptor) GetInterfaces() []*InterfaceDescriptor {
type InterfaceDescriptor struct {
// fullname is the name of the interface
Fullname string `protobuf:"bytes,1,opt,name=fullname,proto3" json:"fullname,omitempty"`
// interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field
// interface_accepting_messages contains information regarding the proto messages which contain the interface as
// google.protobuf.Any field
InterfaceAcceptingMessages []*InterfaceAcceptingMessageDescriptor `protobuf:"bytes,2,rep,name=interface_accepting_messages,json=interfaceAcceptingMessages,proto3" json:"interface_accepting_messages,omitempty"`
// interface_implementers is a list of the descriptors of the interface implementers
InterfaceImplementers []*InterfaceImplementerDescriptor `protobuf:"bytes,3,rep,name=interface_implementers,json=interfaceImplementers,proto3" json:"interface_implementers,omitempty"`

View File

@ -23,7 +23,8 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes)
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes
// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and
// Deletes
type StoreKVPair struct {
StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"`
Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"`

View File

@ -255,8 +255,8 @@ type TxBody struct {
// transaction.
Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
// memo is any arbitrary note/comment to be added to the transaction.
// In clients, any public exposing text should not be called as memo,
// should use `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
// WARNING: in clients, any publicly exposed text should not be called memo,
// but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122).
Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"`
// timeout is the block height after which this transaction will not
// be processed by the chain