mirror of
https://github.com/espressif/openthread.git
synced 2026-08-31 22:39:54 +00:00
[shellcheck] fix SC2155 warning (#8490)
Declare and assign separately to avoid masking return values.
This commit is contained in:
+20
-10
@@ -64,15 +64,25 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
readonly OT_BUILD_JOBS=$(getconf _NPROCESSORS_ONLN)
|
||||
readonly OT_EXCLUDE_DIRS=(third_party doc/site)
|
||||
OT_BUILD_JOBS=$(getconf _NPROCESSORS_ONLN)
|
||||
readonly OT_BUILD_JOBS
|
||||
|
||||
readonly OT_CLANG_SOURCES=('*.c' '*.cc' '*.cpp' '*.h' '*.hpp')
|
||||
readonly OT_MARKDOWN_SOURCES=('*.md')
|
||||
readonly OT_PYTHON_SOURCES=('*.py')
|
||||
OT_EXCLUDE_DIRS=(third_party doc/site)
|
||||
readonly OT_EXCLUDE_DIRS
|
||||
|
||||
readonly OT_CLANG_TIDY_FIX_DIRS=('examples' 'include' 'src' 'tests')
|
||||
readonly OT_CLANG_TIDY_BUILD_OPTS=(
|
||||
OT_CLANG_SOURCES=('*.c' '*.cc' '*.cpp' '*.h' '*.hpp')
|
||||
readonly OT_CLANG_SOURCES
|
||||
|
||||
OT_MARKDOWN_SOURCES=('*.md')
|
||||
readonly OT_MARKDOWN_SOURCES
|
||||
|
||||
OT_PYTHON_SOURCES=('*.py')
|
||||
readonly OT_PYTHON_SOURCES
|
||||
|
||||
OT_CLANG_TIDY_FIX_DIRS=('examples' 'include' 'src' 'tests')
|
||||
readonly OT_CLANG_TIDY_FIX_DIRS
|
||||
|
||||
OT_CLANG_TIDY_BUILD_OPTS=(
|
||||
'-DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
|
||||
'-DOT_ANYCAST_LOCATOR=ON'
|
||||
'-DOT_APP_RCP=OFF'
|
||||
@@ -129,8 +139,9 @@ readonly OT_CLANG_TIDY_BUILD_OPTS=(
|
||||
'-DOT_COMPILE_WARNING_AS_ERROR=ON'
|
||||
'-DOT_UPTIME=ON'
|
||||
)
|
||||
readonly OT_CLANG_TIDY_BUILD_OPTS
|
||||
|
||||
readonly OT_CLANG_TIDY_CHECKS="\
|
||||
OT_CLANG_TIDY_CHECKS="\
|
||||
-*,\
|
||||
google-explicit-constructor,\
|
||||
google-readability-casting,\
|
||||
@@ -149,8 +160,7 @@ readability-redundant-member-init,\
|
||||
readability-simplify-boolean-expr,\
|
||||
readability-static-accessed-through-instance,\
|
||||
"
|
||||
|
||||
#performance-for-range-copy\
|
||||
readonly OT_CLANG_TIDY_CHECKS
|
||||
|
||||
do_clang_format()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user