static analysis of C/C++ code
Release Notes for Cppcheck 2.14.0
Summary:
New checks:
GUI: -Make it possible to suppress warnings in all files in a folder
Changed interface:
Other:
Safety critical:
Release Notes for Cppcheck 2.13
New checks:
Changed interface:
Deprecations:
Other:
native
platform instead of win32A
or win64
. Please specify it explicitly if you depend on it.--template <template>
and --template-format <template>
has been removed. Please use --template=
and --template-format=
instead.Safety critical:
Bug fix:
New checks:
Improved checking:
GUI:
Changed interface:
Deprecations:
Other:
New checks:
Improved checking:
GUI:
Interface:
constParameter
and constVariable
checks have been split into 3 different IDs based on if the variable is a pointer, a reference, or local. The different IDs will allow users to suppress different const warning based on variable type.
constParameter
constParameterReference
constParameterPointer
constVariable
constVariableReference
constVariablePointer
Analysis:
CLI:
GUI:
Build:
match
function to addon similiar to Token::Match
used internally by cppcheck:
|
for either-or tokens(ie struct|class
to match either struct
or class
)!!
to negate a token%any%
, %assign%
, %comp%
, %name%
, %op%
, %or%
, %oror%
, and %var%
keywords(*)
, {*}
, [*]
, and <*>
to match links@
can be added to bind the token to a name**
can be used to match until a tokenthis
pointersdebug_valueflow
and debug_valuetype
to show more detail including source backtracesGUI: Additional options to configure the Autosar, Cert C and Misra C++ coding standards Command line: A --premium option that is used to provide premium options
Add support for container views. The view
attribute has been added to the <container>
library tag to specify the class is a view. The lifetime analysis has been updated to use this new attribute to find dangling lifetime containers.
Various checker improvements.
Fixed false positives.
New checks in core cppcheck:
return std::move(local)
Various improvements:
<function>
tags can now use <container>
tag, so free functions that accept containers such as std::size
, std::empty
, std::begin
, std::end
, etc. can specify the yields
or action
for the container.<smart-pointer>
tag can specify a <unique>
tag for smart pointers that have unique ownership. Cppcheck now warns about dangling references to smart pointers with unique ownership.Misra C 2012 compliance has been "completed" All Misra C 2012 rules have been implemented except 1.1 , 1.2 and 17.3. Including the rules in amendment 1 and amendment 2. The rules 1.1 and 1.2 must be checked with a compiler. The rule 17.3 can be checked by a compiler, for instance GCC.