Skip to content

Commit

Permalink
Merge branch 'main' into am/fix-amino-codec
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Oct 11, 2022
2 parents b56423a + 1917e92 commit dfa9688
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.49.0
version: v1.50.0
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ benchmark:
###############################################################################

golangci_lint_cmd=golangci-lint
golangci_version=v1.49.0
golangci_version=v1.50.0

lint:
@echo "--> Running linter"
Expand Down
2 changes: 1 addition & 1 deletion orm/internal/codegen/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func QueryProtoPluginRunner(p *protogen.Plugin) error {
continue
}

out, err := os.OpenFile(fmt.Sprintf("%s_query.proto", f.GeneratedFilenamePrefix), os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0644)
out, err := os.OpenFile(fmt.Sprintf("%s_query.proto", f.GeneratedFilenamePrefix), os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0o644)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion orm/internal/codegen/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ func (g queryProtoGen) genSingletonRPCMethods(msg *protogen.Message) error {
g.msgs.F("")
return nil
}

func (g queryProtoGen) startRequestType(format string, args ...any) {
g.startRequestResponseType("request", format, args...)
}
Expand Down Expand Up @@ -298,7 +299,6 @@ func (w *writer) F(format string, args ...interface{}) {
if err != nil {
panic(err)
}

}

func (w *writer) Indent() {
Expand Down
1 change: 1 addition & 0 deletions orm/internal/testpb/bank.cosmos_orm.go

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

1 change: 1 addition & 0 deletions orm/internal/testpb/test_schema.cosmos_orm.go

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

5 changes: 3 additions & 2 deletions server/grpc/gogoreflection/fix_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
)

// importsToFix lets us now that we're only fixing gogoproto/gogoproto.proto imports, we're not fixing cosmos protos.
var importsToFix = map[string]string{
"gogo.proto": "gogoproto/gogo.proto",
// "cosmos.proto": "cosmos_proto/cosmos.proto",
}

// fixRegistration is required because certain files register themselves in a way
Expand Down Expand Up @@ -109,7 +109,8 @@ func getExtension(extID int32, m proto.Message) *gogoproto.ExtensionDesc {
}

// check into proto registry
for id, desc := range proto.RegisteredExtensions(m) { //nolint:staticcheck
//nolint:staticcheck // Seems likely that we should refactor this file.
for id, desc := range proto.RegisteredExtensions(m) {
if id == extID {
return &gogoproto.ExtensionDesc{
ExtendedType: desc.ExtendedType,
Expand Down
4 changes: 1 addition & 3 deletions tx/textual/valuerenderer/duration.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ func (dr durationValueRenderer) Format(_ context.Context, v protoreflect.Value,
return err
}

var (
durRegexp = regexp.MustCompile(`^(-)?(?:([0-9]+) days?)?(?:, )?(?:([0-9]+) hours?)?(?:, )?(?:([0-9]+) minutes?)?(?:, )?(?:([0-9]+)(?:\.([0-9]+))? seconds?)?$`)
)
var durRegexp = regexp.MustCompile(`^(-)?(?:([0-9]+) days?)?(?:, )?(?:([0-9]+) hours?)?(?:, )?(?:([0-9]+) minutes?)?(?:, )?(?:([0-9]+)(?:\.([0-9]+))? seconds?)?$`)

// Parse implements the ValueRenderer interface.
func (dr durationValueRenderer) Parse(_ context.Context, r io.Reader) (protoreflect.Value, error) {
Expand Down
1 change: 0 additions & 1 deletion tx/textual/valuerenderer/duration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func TestDurationJSON(t *testing.T) {
require.IsType(t, &dpb.Duration{}, msg)
duration := msg.(*dpb.Duration)
require.True(t, proto.Equal(duration, tc.Proto), "%v vs %v", duration, tc.Proto)

})
}
}

0 comments on commit dfa9688

Please sign in to comment.