Skip to content

Instantly share code, notes, and snippets.

@aakbar5
Last active September 10, 2020 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aakbar5/71e12369f0afec198d03011901576458 to your computer and use it in GitHub Desktop.
Save aakbar5/71e12369f0afec198d03011901576458 to your computer and use it in GitHub Desktop.
cppcheck
# 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
{
"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