Skip to main content
| Infer is a static analysis tool for finding bugs in C, C++, and Java code. CodeRabbit runs Infer to report issues such as null dereferences, resource leaks, and concurrency bugs on changed files. CodeRabbit runs Infer v1.3.0.

Files

Infer will run on changed files with the following extensions:
  • .c
  • .cc
  • .cpp
  • .cxx
  • .h
  • .hh
  • .hpp
  • .hxx
  • .java
CodeRabbit analyzes changed .java files only when enable_java is turned on.

Configuration

boolean
default:true
Enable Infer for static bug analysis in Java and C/C++ code
boolean
default:false
Enable Java analysis: Disabled by default because Java analysis may require compiling more than the changed files.
.coderabbit.yaml

Compilation database discovery

Infer uses a compilation database for C and C++ analysis. CodeRabbit searches the repository for compile_commands.json files while skipping dependency and VCS directories such as .git, node_modules, vendor, third_party, external, and subprojects. When no compilation database is available, CodeRabbit skips C and C++ analysis. Java files are analyzed only when Java analysis is enabled.

When we skip Infer

CodeRabbit will skip running Infer when:
  • Infer is disabled in CodeRabbit settings or .coderabbit.yaml.
  • No changed files match the supported file types.
  • Java is the only matching language and Java analysis is not enabled.
  • Infer is already running in GitHub workflows.
  • C or C++ files changed but no compilation database is available.

What’s next

Tool catalog

Browse all linters, security analyzers, and CI/CD integrations by category and technology.

Tools reference

Explore detailed specifications and configuration options for CodeRabbit tools.