Coding

Infer – static analyzer for Java, C, C++, and Objective-C

Infer is a static code analysis tool developed by Meta for detecting potential defects in Java, C, C++ and Objective-C programs. It examines source code without executing the application, helping developers identify problems before they reach production.

The analyser uses a two-stage workflow. First, it captures compilation commands and translates source files into an intermediate representation. It then analyses functions and methods, building summaries that allow it to reason about behaviour across procedure boundaries and source files.

Infer employs several specialised analysis engines. These examine memory safety, resource management, concurrency and other aspects of program correctness. The tool can analyse individual files or larger projects, with options for incremental analysis and comparing results between code revisions.

This is free and open source software.

Key Features

  • Pulse analysis identifies null-pointer dereferences, use-after-free errors and other memory safety problems.
  • Detects memory leaks, resource leaks and invalid accesses to objects.
  • Identifies potential buffer overruns and uses of uninitialised values.
  • RacerD detects potential data races and thread-safety violations.
  • Reports dead stores, unused values and selected redundant operations.
  • Cost analysis estimates computational complexity and identifies potential performance regressions.
  • Supports taint analysis for tracing potentially unsafe data flows.
  • Detects certain infinite recursion and non-termination problems.
  • Configurable analysis engines and issue types.
  • Supports compilation databases and integration with existing build systems.
  • Incremental analysis examines changed code without requiring a complete reanalysis.
  • Differential reporting distinguishes introduced, fixed and pre-existing issues.
  • Generates text and JSON reports, with tools for exploring analysis results.
  • Cross-platform support – runs on Linux and macOS.

Website: github.com/meta/infer
Support:
Developer: Facebook, Inc. and its affiliates
License: MIT License

Infer is written in OCaml. Learn OCaml with our recommended free books and free tutorials.


Related Software

Java Linter Tools
SpotBugsFind bugs in Java code
PMDExtensible cross-language static code analyzer
Error ProneCatch common Java mistakes
NullAwayEliminate NPEs in Java code
InferStatic analysis tool for Java, C++, Objective-C, and C
CheckstyleWrite Java code that adheres to a coding standard
Checker FrameworkPluggable type-checking for Java
OpenRewriteAutomates large-scale source code refactoring and migration
Find Security BugsDetects security vulnerabilities in Java applications
Forbidden APIsChecks Java code for prohibited or unsafe API usage

Read our verdict in the software roundup.

C and C++ Linters
OCLintStatic code analysis tool for improving quality and reducing defects
cpplintStatic code checker for C++
CodeCheckerPlatform for running static analysers and managing code defects
UncrustifySource code beautifer
InferStatic analyser that detects bugs in Java, C and C++ code
Include What You UseSource analysis tool for C and C++ projects built on Clang
CppcheckStatic analysis tool for C/C++ code
flawfinderScans C and C++ source code for potential security weaknesses
clazyQt-focused static analyser that catches common C++ mistakes
ClangFormatCode formatting tool
Clang-TidyClang-based C++ “linter” tool
SmatchStatic analysis tool for finding defects in C code
CoccinelleSemantic patching tool for analysing and transforming C code

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted