-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(makefile): Add help and necessary comments to the makefile to… #1679
Conversation
… make it more readable Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
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.
Thank you for the help!
Makefile
Outdated
# .DEFAULT_GOAL := build | ||
# .PHONY: clean build format imports lint test unit acceptance prepare-for-pr verify verify-format benchmark | ||
|
||
## bUild: Build the program |
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.
## bUild: Build the program | |
## build: Build the program |
Makefile
Outdated
# this target must be listed first in order for it to be a default target, | ||
# so that ubuntu_ppa's may be constructed using default build tools. |
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.
IMO I think we should leave this. Notes with previous context can be useful
Makefile
Outdated
# append coverage arguments | ||
ifeq ($(TEST_COVERAGE), 1) | ||
unit: GOTESTFLAGS:=$(GOTESTFLAGS) -coverprofile=./out/tests/coverage-unit.txt -covermode=atomic | ||
endif | ||
ifeq ($(NO_DOCKER),) | ||
unit: GOTESTFLAGS:=$(GOTESTFLAGS) --tags=example | ||
endif |
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.
It looks like the removal of this is causing our tests to fail, because it's not correctly generating the unit test coverage files. I think we should put them back in
Makefile
Outdated
# NOTE: You can analyze the results, using go tool pprof. For instance, you can start a server to see a graph of the cpu usage by running | ||
# go tool pprof -http=":8082" out/bench_cpu.out. Alternatively, you can run go tool pprof, and in the ensuing cli, run | ||
# commands like top10 or web to dig down into the cpu and memory usage | ||
# For more, see https://blog.golang.org/pprof |
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.
As above, I think that this can be a useful note to leave in the file.
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'm sorry I shouldn't have dropped it. Thanks for reminding me
Makefile
Outdated
@echo "Targets:" | ||
@echo "" | ||
@awk -F ':|##' '/^[^\.%\t][^\t]*:.*##/{printf " \033[36m%-20s\033[0m %s\n", $$1, $$NF}' $(MAKEFILE_LIST) | sort | ||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' |
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.
nit: Add extra line
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.
Are these empty lines necessary? Because it makes it look a lot clearer
daa2fa1
to
192ed61
Compare
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
192ed61
to
9f84736
Compare
Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
208da0d
to
687ec01
Compare
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.
feature(makefile): Add help and necessary comments to the makefile to make it more readable
style(pkg/common): improve code readability and maintainability
Summary
I want to add help and necessary comments to the makefile to make it more readable.
Output
Before
After
Documentation
Related
Resolves #___