From b8c98cb5fbc8c887b32bfd3283d8cc27ec392614 Mon Sep 17 00:00:00 2001 From: Josh Humphries <2035234+jhump@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:47:45 -0500 Subject: [PATCH] get depend-a-bot PR green --- .golangci.yml | 2 +- experimental/internal/taxa/classify.go | 4 +--- internal/prototest/yaml.go | 3 +-- internal/tools/go.mod | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index aab2391b..b0f1a143 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,7 +57,6 @@ linters: - varnamelen # Other disabled linters - cyclop # covered by gocyclo - - exportloopref # deprecated in golangci-lint v1.60.2 - funlen # rely on code review to limit function length - gocognit # dubious "cognitive overhead" quantification - gofumpt # prefer standard gofmt @@ -70,6 +69,7 @@ linters: - protogetter # lots of false positives: can't use getter to check if field is present - rowserrcheck # no SQL code in protocompile - sqlclosecheck # no SQL code in protocompile + - tenv # deprecated in golangci-lint v1.64.0 - testpackage # internal tests are fine - wastedassign # not supported with generics - wrapcheck # don't _always_ need to wrap errors diff --git a/experimental/internal/taxa/classify.go b/experimental/internal/taxa/classify.go index f816461b..ebf1f0e2 100644 --- a/experimental/internal/taxa/classify.go +++ b/experimental/internal/taxa/classify.go @@ -131,12 +131,10 @@ func Classify(node report.Spanner) Noun { first = pc return false }) - if !first.AsExtension().IsZero() { return CustomOption - } else { - return Option } + return Option case ast.DefField, ast.DefGroup: return Field case ast.DefEnumValue: diff --git a/internal/prototest/yaml.go b/internal/prototest/yaml.go index 08c749a4..d3bf7373 100644 --- a/internal/prototest/yaml.go +++ b/internal/prototest/yaml.go @@ -113,9 +113,8 @@ func (y *toYAML) value(v protoreflect.Value, f protoreflect.FieldDescriptor) any enum := f.Enum() if value := enum.Values().ByNumber(v); value != nil { return value.Name() - } else { - return int32(v) } + return int32(v) case []byte: return string(v) diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 9c4444b3..9f73bca6 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,6 +1,7 @@ module github.com/bufbuild/protocompile/internal/tools -go 1.22.7 +go 1.23.0 + toolchain go1.23.6 require (