How to Install and Uninstall cppcheck Package on Ubuntu 20.10 (Groovy Gorilla)

Last updated: May 05,2024

1. Install "cppcheck" package

Please follow the steps below to install cppcheck on Ubuntu 20.10 (Groovy Gorilla)

$ sudo apt update $ sudo apt install cppcheck

2. Uninstall "cppcheck" package

In this section, we are going to explain the necessary steps to uninstall cppcheck on Ubuntu 20.10 (Groovy Gorilla):

$ sudo apt remove cppcheck $ sudo apt autoclean && sudo apt autoremove

3. Information about the cppcheck package on Ubuntu 20.10 (Groovy Gorilla)

Package: cppcheck
Architecture: amd64
Version: 2.1-1
Priority: optional
Section: universe/devel
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Joachim Reichel
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 7018
Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libpcre3, libstdc++6 (>= 9), libtinyxml2-8 (>= 8.0.0), python3:any, python3-pygments
Suggests: cppcheck-gui
Filename: pool/universe/c/cppcheck/cppcheck_2.1-1_amd64.deb
Size: 1644108
MD5sum: f80e268fed53f121606a11e3494a15f1
SHA1: 5218cdab689b68be5400fd014b6c17e5d4b00a89
SHA256: 3d7aa0c0b2e20510b38d8670b01d975c200964ae0d1941c5627284415978893c
SHA512: fe0426d4e314a43e896bcc213e12c99722e54497f62a0fc2c57ed2d7e0d7f1491971c6a93547fb6959222e5ea8b2c7bbe33f37acfb118b20a93c90704cbe741f
Homepage: http://sourceforge.net/p/cppcheck/wiki/Home/
Description-en: tool for static C/C++ code analysis (CLI)
Cppcheck is a command-line tool that tries to detect bugs that your
C/C++ compiler doesn't see. It is versatile, and can check non-standard
code including various compiler extensions, inline assembly code, etc.
Its internal preprocessor can handle includes, macros, and several
preprocessor commands. While Cppcheck is highly configurable,
you can start using it just by giving it a path to the source code.
.
It includes checks for:
* pointers to out-of-scope auto variables;
* assignment of auto variables to an effective parameter of a function;
* out-of-bounds errors in arrays and STL;
* missing class constructors;
* variables not initialized by a constructor;
* use of memset, memcpy, etcetera on a class;
* non-virtual destructors for base classes;
* operator= not returning a constant reference to itself;
* use of deprecated functions (mktemp, gets, scanf);
* exceptions thrown in destructors;
* memory leaks in class or function variables;
* C-style pointer cast in C++ code;
* redundant if;
* misuse of the strtol or sprintf functions;
* unsigned division or division by zero;
* unused functions and struct members;
* passing parameters by value;
* misuse of signed char variables;
* unusual pointer arithmetic (such as "abc" + 'd');
* dereferenced null pointers;
* incomplete statements;
* misuse of iterators when iterating through a container;
* dereferencing of erased iterators;
* use of invalidated vector iterators/pointers;
.
This package contains the command-line interface for cppcheck.
Description-md5: 9998bc10c93cd21710a4b0829a0bcc92