-
Notifications
You must be signed in to change notification settings - Fork 765
feature: add boilerplate check script #807
feature: add boilerplate check script #807
Conversation
|
We found this is your first time to contribute to Dragonfly, @SataQiu |
Signed-off-by: SataQiu <[email protected]>
91bf1a0 to
0ea6869
Compare
|
/assign @allencloud |
|
That is so good. I like it very much. Thanks so much. I will review this asap. @SataQiu 👏 |
|
|
||
| # boilerplate check | ||
| echo "CHECK: boilerpalte, check code boilerplate" | ||
| result=$(git ls-files | xargs go run ./hack/boilerplate/check-boilerplate.go) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dragonfly (new-807) $ git ls-files | xargs go run ./hack/boilerplate/check-boilerplate.go
Dragonfly (new-807) $ echo $?
0
version (new-807) $ vi version/version.go
Dragonfly (new-807) $ git ls-files | xargs go run ./hack/boilerplate/check-boilerplate.go
error validating "version/version.go": the file is missing a boilerplate
exit status 1
It works with the check file.
While I am afraid that make check fails since there is no docker daemon installed on my machine. I think make file should be friendly with developer's local machine, like windows, mac and so on. And there is no need to depend on the docker engine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I am also curious whether the ./hack/check-docker.sh can be stripped out from make check.
But hack/check.sh is OK, right?
check:
@echo "Begin to check code formats."
./hack/check.sh
@echo "Begin to check dockerd whether is startup"
./hack/check-docker.sh
.PHONY: checkThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whether the ./hack/check-docker.sh can be stripped out from
make check.
I think we should strip that from make check.
hack/hack.sh is OK.
|
LGTM, but I think we should make it work in the integration test of travis. |
@allencloud |
|
LGTM, I would like to merge this first. And then we can keep moving on to polish the check scripts to fit travisCI. Thanks for your work again. @SataQiu |
…ate-check feature: add boilerplate check script
…ate-check feature: add boilerplate check script
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
./hack/check.sh
Ⅴ. Special notes for reviews
Next Steps:
update-boilerplatescript