ux: use docker to format proto files (#5384)

## Description

Add a cmd to docker image and use it to format our proto files. This avoids developers the need to install clang-format

Closes: #XXX
This commit is contained in:
Marko
2020-09-22 21:42:55 +00:00
committed by GitHub
parent 0e311abf19
commit 0aecda68fc
7 changed files with 37 additions and 22 deletions
+5
View File
@@ -89,6 +89,11 @@ proto-lint:
@$(DOCKER_BUF) check lint --error-format=json
.PHONY: proto-lint
proto-format:
@echo "Formatting Protobuf files"
docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
.PHONY: proto-format
proto-check-breaking:
@$(DOCKER_BUF) check breaking --against-input .git#branch=master
.PHONY: proto-check-breaking