Cppcheck
tool for static C/C++ code analysis (CLI)
Command lineDevelopmentLinters, formatters and code tools
Not tested on a device yet. What that means
Cppcheck in Breadstick
Breadstick runs Debian's own cppcheck package for ARM64, the build a Debian 13 computer with an ARM processor installs, so Cppcheck should behave as it does on a Linux PC. It is a command line program rather than an app with a window of its own: you run it by typing its command in Breadstick's Terminal, or in any terminal window on the Linux desktop, and it needs no Desktop or Floating session running.
Commands in the package
cppcheckcppcheck-htmlreport
Type one in Breadstick's Terminal to run it.
Linters, formatters and language servers run on the device's own processor, and editors on the Linux desktop or in the Terminal can call them as they would on a Linux PC. More in the docs: The Terminal.
About Cppcheck
From Debian's package description
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.
From Debian's description of the cppcheck package, under that package's license.
Related apps
Cppcheck GUIA tool for static C/C++ code analysis- pylintPython 3 code static checker and UML diagram generatorCommand line
- clang-formatTool to format C/C++/Obj-C codeCommand line
- astyleSource code indenter for C, C++, Objective-C, C#, and JavaCommand line
- uncrustifyC, C++, ObjectiveC, C#, D, Java, Pawn and VALA source code beautifierCommand line
- mypyoptional static typing for PythonCommand line
Sources and licenses
- Name: the name people know it by, chosen for this catalog; Debian's package is cppcheck.
- Summary: Debian's short description of the cppcheck package, under that package's license.
- Description: Debian's description of the cppcheck package, under that package's license.
- Versions and sizes: Debian's archive for ARM64, as on packages.debian.org.
- Popularity: Debian Popularity Contest counts.
More in About the catalog.