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

Files

Infer will run on changed files with the following extensions:
  • .c
  • .cc
  • .cpp
  • .cxx
  • .h
  • .hh
  • .hpp
  • .hxx
  • .java
Java analysis is disabled by default. Enable reviews.tools.fbinfer.enable_java when you want CodeRabbit to analyze changed Java files with Infer.

Configuration

Infer is disabled by default. Set reviews.tools.fbinfer.enabled to true when you want CodeRabbit to run it, and leave reviews.tools.fbinfer.enable_java as false unless Java analysis should be included.

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.