From dbf201b24b387ae2d5618339e98c1106f51c20de Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Fri, 20 Nov 2020 09:49:43 -0500 Subject: [PATCH] lint protobuf files --- GNUmakefile | 3 +++ tools/buf/buf.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/GNUmakefile b/GNUmakefile index 88c939f4c..3836bbf34 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -240,6 +240,9 @@ checkscripts: ## Lint shell scripts .PHONY: checkproto checkproto: ## Lint protobuf files + @echo "==> Lint proto files..." + @buf check lint --config tools/buf/buf.yaml + @echo "==> Checking for breaking changes in protos..." @buf check breaking --config tools/buf/buf.yaml --against-config tools/buf/buf.yaml --against .git#tag=$(PROTO_COMPARE_TAG) diff --git a/tools/buf/buf.yaml b/tools/buf/buf.yaml index 8bf9cf4a0..47f8619b4 100644 --- a/tools/buf/buf.yaml +++ b/tools/buf/buf.yaml @@ -27,6 +27,11 @@ lint: - plugins/shared/structs/proto/attribute.proto - plugins/shared/structs/proto/recoverable_error.proto - plugins/shared/structs/proto/stats.proto + FIELD_LOWER_SNAKE_CASE: + - plugins/base/proto/base.proto + - plugins/device/proto/device.proto + - plugins/drivers/proto/driver.proto + - plugins/shared/hclspec/hcl_spec.proto PACKAGE_VERSION_SUFFIX: - client/logmon/proto/logmon.proto - drivers/docker/docklog/proto/docker_logger.proto @@ -56,4 +61,4 @@ lint: breaking: use: - - WIRE_JSON \ No newline at end of file + - WIRE_JSON