Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-ci-pipeline
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
IOPSYS
gitlab-ci-pipeline
Commits
9566df31
Commit
9566df31
authored
9 months ago
by
Vivek Dutta
Browse files
Options
Downloads
Patches
Plain Diff
Added clang analysis using cppcheck
parent
8836ee16
No related branches found
No related tags found
1 merge request
!26
Added infer and minor cleanup
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/code-analysis/Dockerfile
+1
-1
1 addition, 1 deletion
docker/code-analysis/Dockerfile
docker/code-analysis/more_test.sh
+14
-4
14 additions, 4 deletions
docker/code-analysis/more_test.sh
with
15 additions
and
5 deletions
docker/code-analysis/Dockerfile
+
1
−
1
View file @
9566df31
...
@@ -245,7 +245,7 @@ RUN cd /opt/dev && \
...
@@ -245,7 +245,7 @@ RUN cd /opt/dev && \
ENV
PATH /infer/bin:${PATH}
ENV
PATH /infer/bin:${PATH}
# Install python ubus module and valgrind-ci
# Install python ubus module and valgrind-ci
RUN
pip3
install
ubus ValgrindCI
RUN
pip3
install
ubus ValgrindCI
codechecker
WORKDIR
/builds/iopsys/
WORKDIR
/builds/iopsys/
...
...
This diff is collapsed.
Click to expand it.
docker/code-analysis/more_test.sh
+
14
−
4
View file @
9566df31
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
log
()
log
()
{
{
echo
"#
$*
...
"
echo
"#
$*
#
"
}
}
exec_cmd
()
exec_cmd
()
...
@@ -33,9 +33,16 @@ generate_compilation_db()
...
@@ -33,9 +33,16 @@ generate_compilation_db()
run_cppcheck_validation
()
run_cppcheck_validation
()
{
{
if
[
-f
"compile_commands.json"
]
;
then
if
[
-f
"compile_commands.json"
]
;
then
exec_cmd cppcheck
--error-exitcode
=
1
--addon
=
threadsafety
--addon
=
cert
--inline-suppr
${
CPPCHECK_OPTIONS
}
--project
=
compile_commands.json
exec_cmd cppcheck
--error-exitcode
=
1
--addon
=
threadsafety
--addon
=
cert
-i
./test
--inline-suppr
${
CPPCHECK_OPTIONS
}
--project
=
compile_commands.json
else
else
exec_cmd cppcheck
--error-exitcode
=
1
--addon
=
threadsafety
--addon
=
cert
--inline-suppr
${
CPPCHECK_OPTIONS
}
${
SOURCE_FOLDER
}
exec_cmd cppcheck
--error-exitcode
=
1
--addon
=
threadsafety
--addon
=
cert
-i
./test
--inline-suppr
${
CPPCHECK_OPTIONS
}
${
SOURCE_FOLDER
}
fi
}
run_cppcheck_clang_validation
()
{
if
[
-f
"compile_commands.json"
]
;
then
exec_cmd cppcheck
--error-exitcode
=
1
--clang
-i
./test
--inline-suppr
${
CPPCHECK_OPTIONS
}
--project
=
compile_commands.json
fi
fi
}
}
...
@@ -53,6 +60,7 @@ main()
...
@@ -53,6 +60,7 @@ main()
# Install pre-req if present/defined
# Install pre-req if present/defined
if
[
-f
"./gitlab-ci/install-dependencies.sh"
]
;
then
if
[
-f
"./gitlab-ci/install-dependencies.sh"
]
;
then
log
"Installing prerequisites for compilation"
exec_cmd ./gitlab-ci/install-dependencies.sh
exec_cmd ./gitlab-ci/install-dependencies.sh
fi
fi
...
@@ -60,11 +68,13 @@ main()
...
@@ -60,11 +68,13 @@ main()
generate_compilation_db
generate_compilation_db
# TODO: Run gcc fanalyzer analysis
# TODO: Run gcc fanalyzer analysis
# TODO: Run clag analysis
# Run cppcheck with compilation-db
# Run cppcheck with compilation-db
run_cppcheck_validation
run_cppcheck_validation
# Run clag analysis
run_cppcheck_clang_validation
# Run infer analysis
# Run infer analysis
run_infer_analysis
run_infer_analysis
}
}
...
...
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