Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
c58cbc26
Commit
c58cbc26
authored
Mar 11, 2018
by
Mario Trangoni
Committed by
Mike Gabriel
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
travis.yml: Add cppcheck - A tool for static C/C++ code analysis.
parent
fd9de008
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
.travis.yml
.travis.yml
+15
-0
run-static-analysis.sh
run-static-analysis.sh
+14
-0
No files found.
.travis.yml
View file @
c58cbc26
...
...
@@ -10,6 +10,16 @@ matrix:
apt
:
sources
:
-
ubuntu-toolchain-r-test
env
:
-
MATRIX_EVAL="CC=gcc && CXX=g++"
-
STATIC_ANALYSIS="yes"
fail_fast
:
true
-
os
:
linux
addons
:
apt
:
sources
:
-
ubuntu-toolchain-r-test
packages
:
-
g++-4.9
env
:
...
...
@@ -47,10 +57,15 @@ matrix:
before_install
:
-
sudo apt-get update -qq
# cppcheck tool
-
sudo apt-get install -y cppcheck/trusty-backports
# imake
-
sudo apt-get install -y xutils-dev
# X11 libaries
-
sudo apt-get install -y libxcomposite-dev libxfont-dev libxinerama-dev libxrandr-dev libxtst-dev x11proto-fonts-dev
-
eval "${MATRIX_EVAL}"
script
:
# run static analysis tools
-
./run-static-analysis.sh
# build all packages
-
make
run-static-analysis.sh
0 → 100755
View file @
c58cbc26
#!/bin/bash
if
[[
"
${
STATIC_ANALYSIS
}
"
==
"yes"
]]
;
then
# cppcheck
if
!
[
-x
"
$(
command
-v
cppcheck
)
"
]
;
then
echo
'Error: cppcheck is not installed.'
>
&2
exit
1
fi
CPPCHECK_OPTS
=
'--error-exitcode=0 --force --quiet'
# we exclude some external projects
CPPCHECK_EXCLUDES
=
'-i ./nx-X11/extras/Mesa* -i ./nx-X11/extras/Mesa_* -i nx-X11/programs/Xserver/GL/mesa*'
echo
"
$(
cppcheck
--version
)
:"
;
cppcheck
$CPPCHECK_OPTS
$CPPCHECK_EXCLUDES
.
;
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment