Skip to main content
Cppcheck is a static code analysis tool for the C and C++ programming languages. CodeRabbit runs Cppcheck v2.22.0.

Files

Cppcheck will run on files with the following extensions:
  • .cpp
  • .cxx
  • .cc
  • .c
  • .tpp
  • .txx

Configuration

boolean
default:true
Enable Cppcheck
.coderabbit.yaml
CodeRabbit passes the following Cppcheck options based on the selected profile:

Chill

Assertive

CodeRabbit uses fixed analysis settings based on the selected profile. Repository Cppcheck configuration files and custom command-line flags are not loaded. Inline suppression comments in source files are supported.

When we skip Cppcheck

CodeRabbit will skip running Cppcheck when:
  • Cppcheck is already running in GitHub Actions, GitLab CI, CircleCI, or Azure Pipelines.

Filtered categories

The following categories are automatically filtered out in both Chill and Assertive modes:
  • normalCheckLevelMaxBranches - too many branches
  • toomanyconfigs - too many configurations
  • missingIncludeSystem - missing system includes
  • missingInclude - missing includes
  • nullPointer - null pointer diagnostics
  • unmatchedSuppression - unmatched suppressions

Profile behavior

In Chill mode:
  • Disables: warning, style, information, portability, unusedFunction
  • Adds command-line suppression flags for the filtered categories listed above
  • Only reports findings with severity “warning” or “error”
  • Filters out the categories listed above from review findings
In Assertive mode:
  • Disables: warning, style, information
  • Does not add command-line suppression flags
  • Reports findings of all remaining severities after filtering out the categories listed above

Include directory discovery

Cppcheck automatically discovers top-level directories containing header files (.h, .hpp, .hxx, .hh) and adds them as include directories. This discovery is limited to a maximum depth of 5 levels to avoid scanning very large repositories.