Using Valgrind to find and correct errors.
git clone --recursive https://github.com/Ghost1995/Valgrind.git
cd <path to repository>
mkdir build
cd build
cmake ..
make
Run tests: ./test/cpp-test
Run program: ./app/shell-app
sudo apt-get install lcov
cmake -D COVERAGE=ON -D CMAKE_BUILD_TYPE=Debug ../
make
make code_coverage
This generates a index.html page in the build/coverage sub-directory that can be viewed locally in a web browser.
-
CppChEclipse
To install and run cppcheck in Terminal
- cd
- Run cppcheck --enable=all --std=c++11 -I include/ --suppress=missingIncludeSystem $( find . -name *.cpp | grep -vE -e "^./build/" -e "^./vendor/" )
-
Google C++ Sytle
To include and use Google C++ Style formatter in Terminal
- cd
- Run cpplint $( find . -name *.h -or -name *.cpp | grep -vE -e "^./build/" -e "^./vendor/" -e "^./docs/" -e "^./results" )