From a99e6952d13ff422f7330db7f8c48ece9da5338d Mon Sep 17 00:00:00 2001 From: Damien Whitten Date: Thu, 12 Feb 2026 15:13:51 +1100 Subject: [PATCH 1/2] Support enum options in prototest --- prototest/prototest.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/prototest/prototest.go b/prototest/prototest.go index 8ccafb3..01004d5 100644 --- a/prototest/prototest.go +++ b/prototest/prototest.go @@ -119,6 +119,28 @@ func TryDescriptorsFromSource(source map[string]string) (*ResultSet, error) { svc := services.Get(i) rs.services[svc.FullName()] = svc } + + enums := fd.Enums() + for i := 0; i < enums.Len(); i++ { + enum := enums.Get(i) + options := enum.Options().(*descriptorpb.EnumOptions) + if options != nil { + if err := setUninterpretedOptions(options, options.UninterpretedOption); err != nil { + return nil, fmt.Errorf("parsing options on %s: %w", enum.FullName(), err) + } + } + + values := enum.Values() + for i := 0; i < values.Len(); i++ { + value := values.Get(i) + options := value.Options().(*descriptorpb.EnumValueOptions) + if options != nil { + if err := setUninterpretedOptions(options, options.UninterpretedOption); err != nil { + return nil, fmt.Errorf("parsing options on %s: %w", value.FullName(), err) + } + } + } + } } return rs, nil From e00e900c681dc0ec315d52ff92ce64db3efb761a Mon Sep 17 00:00:00 2001 From: Damien Whitten Date: Thu, 12 Feb 2026 15:17:01 +1100 Subject: [PATCH 2/2] Update lint --- .github/workflows/lint.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 87430f2..15d4598 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -15,14 +15,18 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: stable - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v8 with: - version: v2.0 + version: v2.9 args: --timeout=5m + + + +