Infer vs PMD
Infer
fbinfer.comPMD
pmd.github.ioSide by side
| Figure | Infer | PMD |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Windows | — | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Static Analysis Tools | 8.6 (#7) | 8.2 (#12) |
| Build integrations | Documented build system integrations include ant, Buck, CMake, Gradle, Make, Maven, xcodebuild, and xctool. | PMD can be integrated through Maven or Gradle builds, which can be configured to fail when violations are found. |
| Installation | Infer can be installed from binary releases, built from source, or run using Docker images. | PMD requires Java 8 or above and is distributed as a ZIP archive containing PMD and CPD. |
| Languages | The documentation lists Java, C, C++, Objective-C, and Erlang; the latest release notes also describe Python and Swift frontends and an experimental Rust frontend. | PMD focuses mainly on Java and Apex and supports 16 other languages, including JavaScript, Kotlin, Swift, and XML. |
| License | The Infer repository states that Infer is MIT-licensed, while noting that enabling Java support may require GPL-licensed components. | The project identifies its license as BSD-style. |
| Purpose | Infer is a static analysis tool that produces a list of potential bugs from Java or C/C++/Objective-C code. | PMD is an extensible cross-language static code analyzer that finds common programming flaws. |
| Support | The project directs users to GitHub issues and the #infer IRC channel on Libera Chat for questions and issue reports. | The project directs users to Stack Overflow for questions, GitHub issues for suspected bugs or requests, and Gitter for quick questions. |
Plans
In their own words
Infer
Infer is a static analysis tool that examines compiled Java, C, C++, Objective-C, and Erlang code and reports potential bugs before release. Its checks include null pointer problems, resource or memory leaks, coding conventions, unavailable APIs, and concurrency issues such as data races. Some analyses can follow an issue across multiple functions or methods and files. Pulse provides memory-safety analysis, while RacerD checks thread safety. Cost analysis estimates asymptotic function complexity for Java and C-family languages; Hack support is experimental, and Python, Rust, and Swift are not supported by that analysis. Infer captures compilation commands, analyzes the captured files, and writes reports that can be reviewed with `infer explore`; files that are not compiled are not analyzed. Integrations are documented for build tools including Buck, CMake, Gradle, Make, Maven, Xcodebuild, and xctool. It can be installed from binary releases, built from source, or run in Docker. The free plan costs nothing. Infer runs on Linux and macOS, with web and self-hosted options; Windows is not supported.
PMD
PMD is a free, extensible static code analyzer that checks source code for programming flaws such as unused variables, empty catch blocks, and unnecessary object creation. It includes more than 400 built-in rules, and teams can write custom rules in Java or XPath. Its bundled CPD tool finds duplicated code across many programming languages. PMD checks source directories from the command line and can run as a Maven, Ant, Gradle, or bld build operation. Supported languages include Java, JavaScript, Salesforce Apex and Visualforce, Kotlin, Swift, Modelica, PL/SQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML, and XSL; Scala is supported without Scala rules. It runs on Linux, macOS, and Windows and requires Java 8 or above. For CI, its GitHub Action can create SARIF reports and fail builds based on violation counts; documentation also covers GitLab, Jenkins, and Bamboo integrations. IDE integrations include Eclipse, IntelliJ IDEA, and Visual Studio Code, though some listed plugins are not actively maintained. Only the latest major version is actively developed.