forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Format proto files. (argoproj#8314)
Signed-off-by: Alex Collins <[email protected]>
- Loading branch information
Showing
12 changed files
with
586 additions
and
581 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Allow unlimited column length, rather than 80. This prevents word-wrapping comments, which end up in Swagger. | ||
ColumnLimit: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,7 @@ SWAGGER_FILES := pkg/apiclient/_.primary.swagger.json \ | |
pkg/apiclient/workflow/workflow.swagger.json \ | ||
pkg/apiclient/workflowarchive/workflow-archive.swagger.json \ | ||
pkg/apiclient/workflowtemplate/workflow-template.swagger.json | ||
PROTO_BINARIES := $(GOPATH)/bin/protoc-gen-gogo $(GOPATH)/bin/protoc-gen-gogofast $(GOPATH)/bin/goimports $(GOPATH)/bin/protoc-gen-grpc-gateway $(GOPATH)/bin/protoc-gen-swagger | ||
PROTO_BINARIES := $(GOPATH)/bin/protoc-gen-gogo $(GOPATH)/bin/protoc-gen-gogofast $(GOPATH)/bin/goimports $(GOPATH)/bin/protoc-gen-grpc-gateway $(GOPATH)/bin/protoc-gen-swagger /usr/local/bin/clang-format | ||
|
||
# protoc,my.proto | ||
define protoc | ||
|
@@ -300,9 +300,19 @@ $(GOPATH)/bin/swagger: | |
$(GOPATH)/bin/goimports: | ||
go install golang.org/x/tools/cmd/[email protected] | ||
|
||
/usr/local/bin/clang-format: | ||
ifeq ($(shell uname),Darwin) | ||
brew install clang-format | ||
else | ||
sudo apt-get install clang-format | ||
endif | ||
|
||
pkg/apis/workflow/v1alpha1/generated.proto: $(GOPATH)/bin/go-to-protobuf $(PROTO_BINARIES) $(TYPES) $(GOPATH)/src/github.com/gogo/protobuf | ||
# These files are generated on a v3/ folder by the tool. Link them to the root folder | ||
[ -e ./v3 ] || ln -s . v3 | ||
# Format proto files. Formatting changes generated code, so we do it here, rather that at lint time. | ||
# Why clang-format? Google uses it. | ||
find pkg/apiclient -name '*.proto'|xargs clang-format -i | ||
$(GOPATH)/bin/go-to-protobuf \ | ||
--go-header-file=./hack/custom-boilerplate.go.txt \ | ||
--packages=github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.