Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
52e1b59e
Commit
52e1b59e
authored
6 years ago
by
Daniel Agar
Committed by
Lorenz Meier
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cmake add nuttx shellcheck helper
parent
096c41b0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Jenkinsfile
+1
-1
1 addition, 1 deletion
Jenkinsfile
Makefile
+2
-1
2 additions, 1 deletion
Makefile
ROMFS/CMakeLists.txt
+19
-0
19 additions, 0 deletions
ROMFS/CMakeLists.txt
ROMFS/px4fmu_common/init.d-posix/rcS
+2
-1
2 additions, 1 deletion
ROMFS/px4fmu_common/init.d-posix/rcS
with
24 additions
and
3 deletions
Jenkinsfile
+
1
−
1
View file @
52e1b59e
...
...
@@ -163,7 +163,7 @@ pipeline {
stage
(
'ShellCheck'
)
{
agent
{
docker
{
image
'px4io/px4-dev-
base
:2018-08-23'
image
'px4io/px4-dev-
nuttx
:2018-08-23'
args
'-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
2
−
1
View file @
52e1b59e
...
...
@@ -325,7 +325,7 @@ python_coverage:
# static analyzers (scan-build, clang-tidy, cppcheck)
# --------------------------------------------------------------------
.PHONY
:
scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck
.PHONY
:
scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck
shellcheck
scan-build
:
@
export
CCC_CC
=
clang
...
...
@@ -362,6 +362,7 @@ cppcheck: posix_sitl_default
shellcheck
:
@$(
SRC_DIR
)
/Tools/run-shellcheck.sh
$(
SRC_DIR
)
/ROMFS/px4fmu_common/
@
make px4fmu-v2_default shellcheck
# Cleanup
# --------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
ROMFS/CMakeLists.txt
+
19
−
0
View file @
52e1b59e
...
...
@@ -144,3 +144,22 @@ add_custom_command(OUTPUT nsh_romfsimg.c
add_library
(
romfs STATIC nsh_romfsimg.c
)
add_dependencies
(
romfs prebuild_targets
)
set_target_properties
(
romfs PROPERTIES LINKER_LANGUAGE C
)
# shellcheck
find_program
(
SHELLCHECK_PATH shellcheck
)
if
(
SHELLCHECK_PATH
)
# TODO: fix SC2039, SC2086, SC2166
add_custom_target
(
shellcheck
COMMAND
${
SHELLCHECK_PATH
}
--shell=sh
--exclude=SC2121
# SC2121: To assign a variable, use just 'var=value'
--exclude=SC2086
# SC2086: Double quote to prevent globbing and word splitting.
--exclude=SC2039
# SC2039: In POSIX sh, == in place of = is undefined.
--exclude=SC2166
# SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
init.d/*
DEPENDS
${
romfs_gen_root_dir
}
/init.d/rc.autostart
WORKING_DIRECTORY
${
romfs_gen_root_dir
}
USES_TERMINAL
)
endif
()
This diff is collapsed.
Click to expand it.
ROMFS/px4fmu_common/init.d-posix/rcS
+
2
−
1
View file @
52e1b59e
...
...
@@ -40,7 +40,8 @@ if [ "$PX4_SIM_MODEL" = "shell" ]; then
set
RUN_MINIMAL_SHELL
yes
else
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
# shellcheck disable=SC2012 #(the file names don't contain spaces)
# TODO: unify with rc.autostart generation
# shellcheck disable=SC2012
REQUESTED_AUTOSTART
=
$(
ls
"
$SCRIPT_DIR
"
|
sed
-n
's/^\([0-9][0-9]*\)_'
${
PX4_SIM_MODEL
}
'$/\1/p'
)
if
[
-z
"
$REQUESTED_AUTOSTART
"
]
;
then
echo
"Error: Unknown model '
$PX4_SIM_MODEL
'"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment