Skip to content

Update dependency cppcheck to v2.22.0 - #16

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/cppcheck-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/cppcheck-2.x

Conversation

@renovate

@renovate renovate Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

This PR contains the following updates:

Package Update Change
cppcheck (source) minor ==2.18.1 → ==2.22.0

Release Notes

cppcheck-opensource/cppcheck (cppcheck)

v2.22.0: cppcheck 2.22.0

Compare Source

Release Notes for Cppcheck 2.22

Major bug fixes & crashes:

  • Fixed a large number of fuzzer-found crashes and hangs in the tokenizer and template simplifier, e.g. TemplateSimplifier::expandTemplate() (bb630c2, 3f2d60c), Tokenizer::simplifyTypedef() (71de675, 3deb36d, 592e7b7), Tokenizer::simplifyUsing() (9162aa7, 7d5a54c), Tokenizer::findGarbageCode() (08db304) and ReverseTraversal::traverse() (3a3184d, 5aa31d0).
  • 6d2b6f4 Fix #​14974 [regression] inline suppression does not work with build dir anymore.
  • 9a500c8 Fix #​14972 [regression] Syntax Error: AST broken, '!' doesn't have an operand.

New checks:

  • 0d7884d Warn when feof() is used as a while loop condition (wrongfeofUsage).
  • 04091bd ftell() result is unspecified when file is opened in mode "t".
  • 3d88880 Detect when an STL algorithm such as std::copy, std::equal, std::transform, etc. accesses more elements through an iterator than are available in the container (algorithmOutOfBounds).
  • f695ade Detect switch cases that cannot be selected when the switch condition has a known value (unreachableSwitchCase).

C/C++ support:

  • b878dc2 Support C++23 'if consteval' / 'if !consteval'.
  • 7a8c67a Fix #​15007 isAttributeNoreturn not set for _Noreturn.

GUI:

  • f81f6f0 Fix #​14829 Platform configuration mismatch between UI selection and analysis log.
  • 9f74c2d Fix #​14813 crash: recheck in GUI sometimes crashes.
  • 550189b Fix #​14738 GUI recheck of files not working properly when importing compile_commands.json.
  • 8f7666d Fix #​14983 GUI: exclude file with relative path.
  • 6640862 Fix #​14933 each GUI log entry line should be output on a separate line.
  • 5799d47 Removed GUI compliance report instructions (feature removed).

Suppressions:

  • 93546a2 XML suppression file: added macro attribute for specifying macro name.
  • fecb349 Fix #​14959 Warning hash for token-based warnings.
  • f6fff71 Fix #​15013 Calculate warning hash for CTU warnings.
  • 0b59984 Baseline functionality (script and documentation).
  • 637d5be Suppression file name cache. (performance)
  • c976cac ErrorLogger: do not open and read from files unless necessary (performance).

Import project:

  • d32c01d Added support for Folders in slnx project files, skip non-C++ projects.
  • 9408a1d Added support for vcxproj ExcludedFromBuild.
  • bf099d1 Import project: handle forced include files from compilation database projects.
  • 3a9750e Flexible handling of -isystem, --sysroot and -I flags in compile_commands.json through the script tweak-compile_commands.py.

Infrastructure & dependencies:

Other:

  • 1fb6630 Added configuration file for Microsoft.GSL (Guideline Support Library).
  • 167f49d, 5aec67c, 767ace6 man/checkers: documented remaining checkers and fixed guideline classifications for MISRA C++.

v2.21.0: Cppcheck-2.21.0

Compare Source

Release Notes for Cppcheck 2.21

Major bug fixes & crashes:

  • Fixed potential crash with incomplete preprocessor directive
  • Fixed hang in createAst
  • Fixed invalid AST for braced initialization and references/pointers
  • Fixed cppcheckError with array typedef
  • Fixed recheck which now correctly excludes non selected files
  • Fixed potential crash when rechecking files in gui

New checks:

  • MISRA C 2012 rule 10.3 now warns on assigning integer literals 0 and 1 to bool in C99 and later while preserving the existing C89 behavior.
  • funcArgNamesDifferentUnnamed warns on function declarations/definitions where a parameter in either location is unnamed
  • uninitMemberVarNoCtor warns on user-defined types where (1) some but not all members requiring initialization have in-class initializers or (2) there is a mixture of members which do/do not require initialization.
  • fcloseInLoopCondition warns when fclose() is used as a while loop condition, which may skip the loop body or double-close the file handle.

C/C++ support:

  • import project: include path in compile_commands.json now handled correctly

GUI:

  • Removed handling of Cppcheck Premium LOC license

Other:

  • Make it possible to specify the regular expression engine using the engine element in a rule XML.
  • Added CLI option --exitcode-suppress to specify an error ID which should not result in a non-zero exitcode.
  • Moved source code from https://github.com/danmar/cppcheck to https://github.com/cppcheck-opensource/cppcheck
  • The official Windows binary is now built with Visual Studio 2026.
  • Updated simplecpp to 1.7.0.

v2.20.1

Compare Source

v2.20.0: Cppcheck-2.20.0

Compare Source

Release Notes for Cppcheck 2.20

GUI:

  • Fix: The Misra C checkbox in "Edit Project" dialog is unchecked after reloading project.
  • Fix: In the Misra Report, use proper icons according to misra classifications
  • Fix: The platform files are not shown in the dropdown in ProjectFileDialog
  • Troubleshooting: detailed progress view that shows what files the threads are working on

Changed interface:

  • removed CMake option "DISABLE_CRTDBG_MAP_ALLOC"
  • CMake option "BUILD_TESTS" has been deprecated and will be removed in Cppcheck 2.22 - use "BUILD_TESTING" instead

Other:

  • The built-in "win*" and "unix*" platforms will now default to signed char type instead of unknown signedness. If you require unsigned chars please specify "--funsigned-char"
  • bumped minimum required CMake version to 3.22
  • Support inline polyspace suppressions

v2.18.3

Compare Source

v2.18.2

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 26c99a1 to 1757230 Compare April 22, 2026 09:38
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 1757230 to 254d945 Compare April 24, 2026 14:36
@MialLewis
MialLewis force-pushed the main branch 2 times, most recently from ea79c48 to 5061393 Compare April 29, 2026 12:44
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 254d945 to aae8229 Compare April 29, 2026 12:48
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from aae8229 to 8e4cbb9 Compare May 11, 2026 09:47
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 8e4cbb9 to 912c8d6 Compare June 6, 2026 19:43
@renovate renovate Bot changed the title Update dependency cppcheck to v2.20.1 Update dependency cppcheck to v2.21.0 Jun 6, 2026
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 912c8d6 to a248e86 Compare July 25, 2026 03:46
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from a248e86 to 94b05b4 Compare August 1, 2026 12:19
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from 94b05b4 to be8d88d Compare September 12, 2026 15:51
@renovate
renovate Bot force-pushed the renovate/cppcheck-2.x branch from be8d88d to e6d8711 Compare September 27, 2026 07:56
@renovate renovate Bot changed the title Update dependency cppcheck to v2.21.0 Update dependency cppcheck to v2.22.0 Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants