[script] update make-pretty to bash (#4698)

- Also update CONTRIBUTING.md and STYLE_GUIDE.md.
This commit is contained in:
Jonathan Hui
2020-03-18 19:04:10 -07:00
committed by GitHub
parent ccf4eb9a51
commit 4ee8010558
5 changed files with 7 additions and 7 deletions
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# Copyright (c) 2018, The OpenThread Authors.
# All rights reserved.
@@ -45,6 +45,6 @@ die() {
for file in "$@"; do
echo "Checking ${file}"
"$(dirname "$0")"/clang-format.sh -style=file "${file}" | diff -u "${file}" - || die "${file} is not pretty."
"$(dirname "$0")"/clang-format -style=file "${file}" | diff -u "${file}" - || die "${file} is not pretty."
[ -z "$(tail -c1 "${file}")" ] || die "${file} misses EOF newline."
done
+2 -2
View File
@@ -62,7 +62,7 @@ do_clang_format()
echo -e '====================='
git ls-files "${OT_CLANG_SOURCES[@]}" | grep -E "^($(echo "${OT_CLANG_DIRS[@]}" | tr ' ' '|'))" \
| xargs -n3 -P"${OT_BUILD_JOBS}" script/clang-format.sh -style=file -i -verbose
| xargs -n3 -P"${OT_BUILD_JOBS}" script/clang-format -style=file -i -verbose
}
do_clang_check()
@@ -72,7 +72,7 @@ do_clang_check()
echo -e '====================='
git ls-files "${OT_CLANG_SOURCES[@]}" | grep -E "^($(echo "${OT_CLANG_DIRS[@]}" | tr ' ' '|'))" \
| xargs -n3 -P"${OT_BUILD_JOBS}" script/clang-format-check.sh
| xargs -n3 -P"${OT_BUILD_JOBS}" script/clang-format-check
}
do_python_format()