mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
shellcheck ignore array references for now (SC2039) and run everywhere
This commit is contained in:
committed by
Lorenz Meier
parent
52e1b59e60
commit
e4088204ee
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -170,7 +170,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
sh 'export'
|
sh 'export'
|
||||||
sh 'make distclean'
|
sh 'make distclean'
|
||||||
sh 'make shellcheck'
|
sh 'make shellcheck_all'
|
||||||
sh 'make distclean'
|
sh 'make distclean'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -325,7 +325,7 @@ python_coverage:
|
|||||||
|
|
||||||
# static analyzers (scan-build, clang-tidy, cppcheck)
|
# static analyzers (scan-build, clang-tidy, cppcheck)
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck shellcheck
|
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck shellcheck_all
|
||||||
|
|
||||||
scan-build:
|
scan-build:
|
||||||
@export CCC_CC=clang
|
@export CCC_CC=clang
|
||||||
@@ -360,7 +360,7 @@ cppcheck: posix_sitl_default
|
|||||||
@cppcheck -i$(SRC_DIR)/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project=$(SRC_DIR)/build/posix_sitl_default/compile_commands.json --xml-version=2 2> $(SRC_DIR)/build/cppcheck/cppcheck-result.xml > /dev/null
|
@cppcheck -i$(SRC_DIR)/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project=$(SRC_DIR)/build/posix_sitl_default/compile_commands.json --xml-version=2 2> $(SRC_DIR)/build/cppcheck/cppcheck-result.xml > /dev/null
|
||||||
@cppcheck-htmlreport --source-encoding=ascii --file=$(SRC_DIR)/build/cppcheck/cppcheck-result.xml --report-dir=$(SRC_DIR)/build/cppcheck --source-dir=$(SRC_DIR)/src/
|
@cppcheck-htmlreport --source-encoding=ascii --file=$(SRC_DIR)/build/cppcheck/cppcheck-result.xml --report-dir=$(SRC_DIR)/build/cppcheck --source-dir=$(SRC_DIR)/src/
|
||||||
|
|
||||||
shellcheck:
|
shellcheck_all:
|
||||||
@$(SRC_DIR)/Tools/run-shellcheck.sh $(SRC_DIR)/ROMFS/px4fmu_common/
|
@$(SRC_DIR)/Tools/run-shellcheck.sh $(SRC_DIR)/ROMFS/px4fmu_common/
|
||||||
@make px4fmu-v2_default shellcheck
|
@make px4fmu-v2_default shellcheck
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ echo "Running shellcheck in '$search_directory'."
|
|||||||
# SC2086: double quote to prevent globbing and word splitting
|
# SC2086: double quote to prevent globbing and word splitting
|
||||||
# SC2166: allow the form [ $OUTPUT_MODE == fmu -o $OUTPUT_MODE == io ]
|
# SC2166: allow the form [ $OUTPUT_MODE == fmu -o $OUTPUT_MODE == io ]
|
||||||
# SC2148: allow files w/o shebang
|
# SC2148: allow files w/o shebang
|
||||||
|
# SC2039: In POSIX sh, array references are undefined. TODO: fix this
|
||||||
shellcheck -x \
|
shellcheck -x \
|
||||||
-e SC1008 \
|
-e SC1008 \
|
||||||
-e SC2086 \
|
-e SC2086 \
|
||||||
-e SC2121 \
|
-e SC2121 \
|
||||||
-e SC2148 \
|
-e SC2148 \
|
||||||
-e SC2166 \
|
-e SC2166 \
|
||||||
|
-e SC2039 \
|
||||||
$scripts
|
$scripts
|
||||||
ret=$?
|
ret=$?
|
||||||
if [ $ret -ne 0 ]; then
|
if [ $ret -ne 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user