Added cppcheck to travis
This commit is contained in:
parent
2c803da0cd
commit
f025a478b2
|
@ -22,7 +22,7 @@ before_install:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
|
- sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
|
||||||
- sudo apt-get install -y cmake cmake-data check lua5.2 liblua5.2-dev
|
- sudo apt-get install -y cmake cmake-data check lua5.2 liblua5.2-dev cppcheck
|
||||||
|
|
||||||
#g++6
|
#g++6
|
||||||
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y g++-6; fi
|
- if [ "$CXX" = "g++" ]; then sudo apt-get install -y g++-6; fi
|
||||||
|
@ -39,3 +39,4 @@ script:
|
||||||
- cmake ..
|
- cmake ..
|
||||||
- make
|
- make
|
||||||
- make test
|
- make test
|
||||||
|
- make lint
|
||||||
|
|
|
@ -77,6 +77,11 @@ if (NOT WIN32)
|
||||||
-Wmissing-prototypes
|
-Wmissing-prototypes
|
||||||
-Wconversion -Wno-sign-conversion
|
-Wconversion -Wno-sign-conversion
|
||||||
)
|
)
|
||||||
|
add_custom_target(lint
|
||||||
|
COMMENT "Running cppcheck"
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
COMMAND cppcheck --language=c --error-exitcode=1 --template=gcc --enable=warning,performance,portability,information,missingInclude --quiet src/*
|
||||||
|
)
|
||||||
endif (NOT WIN32)
|
endif (NOT WIN32)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
||||||
|
|
Loading…
Reference in New Issue