문제

I use cppcheck for static code analysis in my project and TeamCity for continuous integration. It would be nice if build server didn't build the project when cppcheck finds some errors or warnings. Is there any way to make build fail by result of cppcheck analysis?

도움이 되었습니까?

해결책

I'm a cppcheck dev. The cppcheck command line flag --error-exitcode might help.

다른 팁

The latest version of cppcheck requires that you pass an actual return code to --error-exitcode; otherwise, it fails by telling you no such flag exists.

cppcheck --error-exitcode=1 ...

The above will exit with code 1 in the event something is found.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top