Add cppcheck static analysis to travis build (#939)
This runs cppcheck static analysis as part of the travis-ci checks. The current Travis version of cppcheck doesn't appear to support all the checks we want, but for now should be sufficient. Identified issues that would cause these checks to fail have been resolved in previous commits. Thanks to @turol for doing the work to set this up.
This commit is contained in:
parent
a89a0e655d
commit
63141cfc0d
2 changed files with 16 additions and 1 deletions
10
.travis.sh
Executable file
10
.travis.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
if [ "$ANALYZE" = "true" ] ; then
|
||||
cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen > /dev/null
|
||||
else
|
||||
./autogen.sh
|
||||
make
|
||||
make install DESTDIR=/tmp/whatever
|
||||
make dist
|
||||
fi
|
||||
|
|
@ -7,16 +7,21 @@ compiler: gcc
|
|||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
env:
|
||||
- ANALYZE=false
|
||||
- ANALYZE=true
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- cppcheck
|
||||
- libsdl2-dev
|
||||
- libsdl2-mixer-dev
|
||||
- libsdl2-net-dev
|
||||
- libsdl2-image-dev
|
||||
- libsamplerate0-dev
|
||||
|
||||
script: ./autogen.sh && make && make install DESTDIR=/tmp/whatever && make dist
|
||||
script: ./.travis.sh
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
|
|
|||
Loading…
Reference in a new issue