How To Install cppcheck on Fedora 36

In this tutorial we learn how to install cppcheck in Fedora 36. cppcheck is Tool for static C/C++ code analysis

Introduction

In this tutorial we learn how to install cppcheck on Fedora 36.

What is cppcheck

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).

We can use yum or dnf to install cppcheck on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install cppcheck.

Install cppcheck on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install cppcheck using dnf by running the following command:

sudo dnf -y install cppcheck

Install cppcheck on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install cppcheck using yum by running the following command:

sudo yum -y install cppcheck

How To Uninstall cppcheck on Fedora 36

To uninstall only the cppcheck package we can use the following command:

sudo dnf remove cppcheck

cppcheck Package Contents on Fedora 36

/usr/bin/cppcheck
/usr/lib/.build-id
/usr/lib/.build-id/d1
/usr/lib/.build-id/d1/e85d0f4d9df835ad8eb3a0321934e81f069749
/usr/share/Cppcheck
/usr/share/Cppcheck/addons
/usr/share/Cppcheck/addons/__init__.py
/usr/share/Cppcheck/addons/cert.py
/usr/share/Cppcheck/addons/cppcheck.py
/usr/share/Cppcheck/addons/cppcheckdata.py
/usr/share/Cppcheck/addons/findcasts.py
/usr/share/Cppcheck/addons/misc.py
/usr/share/Cppcheck/addons/misra.py
/usr/share/Cppcheck/addons/misra_9.py
/usr/share/Cppcheck/addons/naming.py
/usr/share/Cppcheck/addons/namingng.py
/usr/share/Cppcheck/addons/runaddon.py
/usr/share/Cppcheck/addons/threadsafety.py
/usr/share/Cppcheck/addons/y2038.py
/usr/share/Cppcheck/cfg
/usr/share/Cppcheck/cfg/avr.cfg
/usr/share/Cppcheck/cfg/bento4.cfg
/usr/share/Cppcheck/cfg/boost.cfg
/usr/share/Cppcheck/cfg/bsd.cfg
/usr/share/Cppcheck/cfg/cairo.cfg
/usr/share/Cppcheck/cfg/cppcheck-lib.cfg
/usr/share/Cppcheck/cfg/cppunit.cfg
/usr/share/Cppcheck/cfg/daca.cfg
/usr/share/Cppcheck/cfg/dpdk.cfg
/usr/share/Cppcheck/cfg/embedded_sql.cfg
/usr/share/Cppcheck/cfg/emscripten.cfg
/usr/share/Cppcheck/cfg/ginac.cfg
/usr/share/Cppcheck/cfg/gnu.cfg
/usr/share/Cppcheck/cfg/googletest.cfg
/usr/share/Cppcheck/cfg/gtk.cfg
/usr/share/Cppcheck/cfg/icu.cfg
/usr/share/Cppcheck/cfg/kde.cfg
/usr/share/Cppcheck/cfg/libcerror.cfg
/usr/share/Cppcheck/cfg/libcurl.cfg
/usr/share/Cppcheck/cfg/libsigc++.cfg
/usr/share/Cppcheck/cfg/lua.cfg
/usr/share/Cppcheck/cfg/mfc.cfg
/usr/share/Cppcheck/cfg/microsoft_atl.cfg
/usr/share/Cppcheck/cfg/microsoft_sal.cfg
/usr/share/Cppcheck/cfg/microsoft_unittest.cfg
/usr/share/Cppcheck/cfg/motif.cfg
/usr/share/Cppcheck/cfg/nspr.cfg
/usr/share/Cppcheck/cfg/ntl.cfg
/usr/share/Cppcheck/cfg/opencv2.cfg
/usr/share/Cppcheck/cfg/opengl.cfg
/usr/share/Cppcheck/cfg/openmp.cfg
/usr/share/Cppcheck/cfg/openssl.cfg
/usr/share/Cppcheck/cfg/pcre.cfg
/usr/share/Cppcheck/cfg/posix.cfg
/usr/share/Cppcheck/cfg/python.cfg
/usr/share/Cppcheck/cfg/qt.cfg
/usr/share/Cppcheck/cfg/ruby.cfg
/usr/share/Cppcheck/cfg/sdl.cfg
/usr/share/Cppcheck/cfg/sfml.cfg
/usr/share/Cppcheck/cfg/sqlite3.cfg
/usr/share/Cppcheck/cfg/std.cfg
/usr/share/Cppcheck/cfg/tinyxml2.cfg
/usr/share/Cppcheck/cfg/vcl.cfg
/usr/share/Cppcheck/cfg/windows.cfg
/usr/share/Cppcheck/cfg/wxsqlite3.cfg
/usr/share/Cppcheck/cfg/wxsvg.cfg
/usr/share/Cppcheck/cfg/wxwidgets.cfg
/usr/share/Cppcheck/cfg/zlib.cfg
/usr/share/Cppcheck/help
/usr/share/Cppcheck/help/online-help.qch
/usr/share/Cppcheck/help/online-help.qhc
/usr/share/Cppcheck/lang
/usr/share/Cppcheck/lang/cppcheck_de.qm
/usr/share/Cppcheck/lang/cppcheck_es.qm
/usr/share/Cppcheck/lang/cppcheck_fi.qm
/usr/share/Cppcheck/lang/cppcheck_fr.qm
/usr/share/Cppcheck/lang/cppcheck_it.qm
/usr/share/Cppcheck/lang/cppcheck_ja.qm
/usr/share/Cppcheck/lang/cppcheck_ko.qm
/usr/share/Cppcheck/lang/cppcheck_nl.qm
/usr/share/Cppcheck/lang/cppcheck_ru.qm
/usr/share/Cppcheck/lang/cppcheck_sr.qm
/usr/share/Cppcheck/lang/cppcheck_sv.qm
/usr/share/Cppcheck/lang/cppcheck_zh_CN.qm
/usr/share/Cppcheck/platforms
/usr/share/Cppcheck/platforms/aix_ppc64.xml
/usr/share/Cppcheck/platforms/arm32-wchar_t2.xml
/usr/share/Cppcheck/platforms/arm32-wchar_t4.xml
/usr/share/Cppcheck/platforms/arm64-wchar_t2.xml
/usr/share/Cppcheck/platforms/arm64-wchar_t4.xml
/usr/share/Cppcheck/platforms/avr8.xml
/usr/share/Cppcheck/platforms/cray_sv1.xml
/usr/share/Cppcheck/platforms/elbrus-e1cp.xml
/usr/share/Cppcheck/platforms/mips32.xml
/usr/share/Cppcheck/platforms/msp430_eabi_large_datamodel.xml
/usr/share/Cppcheck/platforms/pic16.xml
/usr/share/Cppcheck/platforms/pic8-enhanced.xml
/usr/share/Cppcheck/platforms/pic8.xml
/usr/share/Cppcheck/platforms/unix32-unsigned.xml
/usr/share/Cppcheck/platforms/unix64-unsigned.xml
/usr/share/doc/cppcheck
/usr/share/doc/cppcheck/AUTHORS
/usr/share/doc/cppcheck/manual.html
/usr/share/doc/cppcheck/reference-cfg-format.html
/usr/share/licenses/cppcheck
/usr/share/licenses/cppcheck/COPYING
/usr/share/man/man1/cppcheck.1.gz

References

Summary

In this tutorial we learn how to install cppcheck on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).