mirror of
https://github.com/espressif/openthread.git
synced 2026-08-04 09:57:47 +00:00
[script] update make-pretty to bash (#4698)
- Also update CONTRIBUTING.md and STYLE_GUIDE.md.
This commit is contained in:
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user