Last active
September 10, 2020 21:09
-
-
Save aakbar5/71e12369f0afec198d03011901576458 to your computer and use it in GitHub Desktop.
cppcheck
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pre-built package (# Ubuntu 18.04.3 LTS) | |
sudo apt update | |
sudo apt install cppcheck | |
# Build from code | |
wget https://github.com/danmar/cppcheck/archive/2.1.tar.gz | |
tar zxvf 2.1.tar.gz | |
cd cppcheck-2.1 | |
mkdir build | |
cd build | |
cmake .. | |
make | |
sudo make install | |
# Check installation | |
which cppcheck /usr/local/bin/cppcheck | |
cppcheck --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"label": "Run cppCheck", | |
"command": "/usr/local/bin/cppcheck", | |
"args": [ | |
"--project=${workspaceRoot}/build/compile_commands.json" | |
], | |
"problemMatcher": "$gcc", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment