forked from Archive/PX4-Autopilot
shellcheck fix rc.autostart return and improve globbing
This commit is contained in:
parent
3e9e5ed372
commit
161cf7f5d9
2
Makefile
2
Makefile
|
@ -401,7 +401,7 @@ cppcheck: px4_sitl_default
|
|||
|
||||
shellcheck_all:
|
||||
@"$(SRC_DIR)"/Tools/run-shellcheck.sh "$(SRC_DIR)"/ROMFS/px4fmu_common/
|
||||
@make px4_fmu-v2_default shellcheck
|
||||
@make px4_fmu-v5_default shellcheck
|
||||
|
||||
validate_module_configs:
|
||||
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
|
||||
|
|
|
@ -188,6 +188,7 @@ set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
|
|||
find_program(SHELLCHECK_PATH shellcheck)
|
||||
|
||||
if(SHELLCHECK_PATH)
|
||||
|
||||
# TODO: fix SC2086, SC2166
|
||||
add_custom_target(shellcheck
|
||||
COMMAND ${SHELLCHECK_PATH} --shell=sh
|
||||
|
@ -195,7 +196,7 @@ if(SHELLCHECK_PATH)
|
|||
--exclude=SC2086 # SC2086: Double quote to prevent globbing and word splitting.
|
||||
--exclude=SC2166 # SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
|
||||
--exclude=SC2154 # SC2154: <var> is referenced but not assigned (NuttX uses different asssignment)
|
||||
init.d/*
|
||||
`find ${romfs_gen_root_dir}/init.d -type f`
|
||||
DEPENDS ${romfs_gen_root_dir}/init.d/rc.autostart
|
||||
WORKING_DIRECTORY ${romfs_gen_root_dir}
|
||||
USES_TERMINAL
|
||||
|
|
|
@ -30,7 +30,7 @@ class RCOutput():
|
|||
"# 14000 .. 14999 Tri Y\n"
|
||||
""
|
||||
""
|
||||
"cd /etc/init.d/airframes\n"
|
||||
"cd /etc/init.d/airframes || return\n"
|
||||
"\n")
|
||||
for group in groups:
|
||||
result += "# GROUP: %s\n\n" % group.GetName()
|
||||
|
|
Loading…
Reference in New Issue