diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6cfb19f..dee41d6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,3 +39,5 @@ jobs: run: make format - name: Check generated run: make checkgenerate + env: + BUF_TOKEN: ${{ secrets.BUF_TOKEN }} diff --git a/Makefile b/Makefile index 23ea251..4614c83 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license header .PHONY: format format: install $(BIN)/license-header ## Format code $(ADD_LICENSE_HEADER) + buf format --write . uv run -- ruff format protovalidate test uv run -- ruff check --fix protovalidate test diff --git a/proto/tests/example/v1/validations.proto b/proto/tests/example/v1/validations.proto index fbf0467..e942451 100644 --- a/proto/tests/example/v1/validations.proto +++ b/proto/tests/example/v1/validations.proto @@ -52,7 +52,10 @@ message ProtovalidateOneof { string b = 2; bool unrelated = 3; option (buf.validate.message).oneof = { - fields: ["a", "b"] + fields: [ + "a", + "b" + ] }; } @@ -61,7 +64,10 @@ message ProtovalidateOneofRequired { string b = 2; bool unrelated = 3; option (buf.validate.message).oneof = { - fields: ["a", "b"] + fields: [ + "a", + "b" + ] required: true }; } @@ -71,7 +77,11 @@ message ProtovalidateOneofUnknownFieldName { string b = 2; bool unrelated = 3; option (buf.validate.message).oneof = { - fields: ["a", "b", "xxx"] + fields: [ + "a", + "b", + "xxx" + ] }; }