Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
632a2414
Unverified
Commit
632a2414
authored
6 years ago
by
kongr45gpen
Browse files
Options
Downloads
Patches
Plain Diff
Some cleanup and utilities added on cppcheck-misra
parent
5ed4630b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+10
-0
10 additions, 0 deletions
.gitignore
ci/cppcheck-misra.sh
+8
-1
8 additions, 1 deletion
ci/cppcheck-misra.sh
with
18 additions
and
1 deletion
.gitignore
+
10
−
0
View file @
632a2414
...
@@ -3,6 +3,13 @@ build
...
@@ -3,6 +3,13 @@ build
cmake-build-debug
cmake-build-debug
docs
docs
# Dump and continuous integration files
*.dump
__pycache__
/ci/cppcheckdata.py
/ci/misra.py
/ci/report.msr
# Prerequisites
# Prerequisites
*.d
*.d
...
@@ -65,3 +72,6 @@ docs
...
@@ -65,3 +72,6 @@ docs
.idea/**/uiDesigner.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
.idea/**/dbnavigator.xml
.idea/**/markdown-*
.idea/**/markdown-*
# IDEs
.vscode
\ No newline at end of file
This diff is collapsed.
Click to expand it.
ci/cppcheck-misra.sh
+
8
−
1
View file @
632a2414
...
@@ -7,18 +7,25 @@
...
@@ -7,18 +7,25 @@
# $ ci/cppcheck-misra.sh
# $ ci/cppcheck-misra.sh
#
#
# make sure we are in the correct directory, regardless of where the script was called from
cd
"
$(
dirname
"
$0
"
)
/.."
echo
-e
"
\u
001b[34;1mGetting prerequisites...
\u
001b[0m"
echo
-e
"
\u
001b[34;1mGetting prerequisites...
\u
001b[0m"
# grab the MISRA addon and the cppcheck addon interface from github
# grab the MISRA addon and the cppcheck addon interface from github
curl https://raw.githubusercontent.com/danmar/cppcheck/f4b5b156d720c712f6ce99f6e01d8c1b3f800d52/addons/misra.py
>
ci/misra.py
curl https://raw.githubusercontent.com/danmar/cppcheck/f4b5b156d720c712f6ce99f6e01d8c1b3f800d52/addons/misra.py
>
ci/misra.py
curl https://raw.githubusercontent.com/danmar/cppcheck/f4b5b156d720c712f6ce99f6e01d8c1b3f800d52/addons/cppcheckdata.py
>
ci/cppcheckdata.py
curl https://raw.githubusercontent.com/danmar/cppcheck/f4b5b156d720c712f6ce99f6e01d8c1b3f800d52/addons/cppcheckdata.py
>
ci/cppcheckdata.py
# clean up old files
echo
-e
"
\u
001b[34;1mRemoving old files...
\u
001b[0m"
echo
>
ci/report.msr
# clear the report file
find inc/ src/
-type
f
-name
"*.dump"
| xargs
rm
# generate dump files (XML representations of AST etc.) for all headers, source files etc.
# generate dump files (XML representations of AST etc.) for all headers, source files etc.
echo
-e
"
\u
001b[34;1mGenerating dump files...
\u
001b[0m"
echo
-e
"
\u
001b[34;1mGenerating dump files...
\u
001b[0m"
find inc/ src/
-type
f
\(
-iname
"*.cpp"
-or
-iname
"*.hpp"
\)
| xargs cppcheck
--dump
find inc/ src/
-type
f
\(
-iname
"*.cpp"
-or
-iname
"*.hpp"
\)
| xargs cppcheck
--dump
# run the MISRA checks against the dumps and send the results to a file
# run the MISRA checks against the dumps and send the results to a file
echo
-e
"
\u
001b[34;1mRunning MISRA C(2012) rule compliance tests...
\u
001b[0m"
echo
-e
"
\u
001b[34;1mRunning MISRA C(2012) rule compliance tests...
\u
001b[0m"
echo
>
ci/report.msr
# clear the report file
find inc/ src/
-type
f
-name
"*.dump"
| xargs python3 ci/misra.py
>>
ci/report.msr 2>&1
find inc/ src/
-type
f
-name
"*.dump"
| xargs python3 ci/misra.py
>>
ci/report.msr 2>&1
# pre-process the generated report to remove all useless strings
# pre-process the generated report to remove all useless strings
...
...
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