提交 abe47202 编写于 作者: C changsh726 提交者: Liu Jiaming

Scripts: apollo_format.sh bugfix

上级 600a1102
......@@ -41,7 +41,7 @@ struct TimerOption {
: period(period), callback(callback), oneshot(oneshot) {}
/**
* @brief Default onstructor for initializer list
* @brief Default constructor for initializer list
*
*/
TimerOption() : period(), callback(), oneshot() {}
......
......@@ -32,6 +32,8 @@ FORMAT_PYTHON=0
FORMAT_SHELL=0
FORMAT_ALL=0
HAS_OPTION=0
function print_usage() {
echo -e "\n${RED}Usage${NO_COLOR}:
.${BOLD}$0${NO_COLOR} [OPTION] <path/to/src/dir/or/files>"
......@@ -76,22 +78,27 @@ function main() {
case "${opt}" in
-p | --python)
FORMAT_PYTHON=1
HAS_OPTION=1
shift
;;
-c | --cpp)
FORMAT_CPP=1
HAS_OPTION=1
shift
;;
-b | --bazel)
FORMAT_BAZEL=1
HAS_OPTION=1
shift
;;
-s | --shell)
FORMAT_SHELL=1
HAS_OPTION=1
shift
;;
-m | --markdown)
FORMAT_MARKDOWN=1
HAS_OPTION=1
shift
;;
-a | --all)
......@@ -107,7 +114,9 @@ function main() {
print_usage
exit 1
else
FORMAT_ALL=1
if [ "$HAS_OPTION" -eq 0 ]; then
FORMAT_ALL=1
fi
break
fi
;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册