Checkstyle VS PMD

Compare Checkstyle vs PMD and see what are their differences.

Checkstyle

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program. (by checkstyle)
Our great sponsors
  • Scout APM - A developer's best friend. Try free for 14-days
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • SaaSHub - Software Alternatives and Reviews
Checkstyle PMD
9 9
6,457 3,630
2.3% 0.7%
9.8 9.8
about 13 hours ago about 22 hours ago
Java Java
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Checkstyle

Posts with mentions or reviews of Checkstyle. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-27.

PMD

Posts with mentions or reviews of PMD. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-25.
  • Is it possible to measure spaghettiness of code?
    4 projects | reddit.com/r/AskProgramming | 25 Nov 2021
    This is the definition of cohesion and there are many great tools to calculate cohesion metrics (depending on the programming language e.g Java). Cohesion metrics belong to a bigger set of metrics called OOP metrics (or ck metrics). Check out the following links: https://github.com/mauricioaniche/ck https://github.com/cqfn/jpeek https://github.com/rodhilton/jasome https://github.com/pmd/pmd
  • An Incomplete List of Practical Security for Mortals
    9 projects | dev.to | 6 Jul 2021
    some good tools for general code analysis (Java): Sonarqube, PMD, SpotBugs
  • Does anybody know any good materials for java defensive coding please?.
    4 projects | reddit.com/r/java | 19 Jun 2021
  • 10 Signs Your Salesforce Code Needs Attention
    2 projects | dev.to | 23 Apr 2021
    If you are a developer or have access to someone who knows Salesforce development, there are analysis tools that can help you take stock of your situation directly. PMD, CPD, ESLint, Apex tests, and Jest tests are a few of these.
  • Design an Effective Build Stage for Continuous Integration
    12 projects | dev.to | 8 Apr 2021
    Another nice checker to use in your CI environment is PMD. PMD works with Java, JavaScript, and Oracle’s SQL. You can scan code with the default rules for Java with the following:
    12 projects | dev.to | 8 Apr 2021
    sem-version java 11 checkout wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.32.0/pmd-bin-6.32.0.zip unzip pmd-bin-6.32.0.zip ./pmd-bin-6.32.0/bin/run.sh pmd -d . -R rulesets/java/quickstart.xml -f text
  • Errors as Values: Free Yourself From Unexpected Runtime Exceptions
    7 projects | dev.to | 2 Apr 2021
    In dynamic and typed languages, linters are used. These are used before you run or compile the code. They vary in purpose, but all typically format code, help find common errors, and help guide on language best practices. For typed languages, these tools work alongside the compiler, giving you extra quality checks that the compiler doesn’t provide natively. Examples include PyLint for Python, ESLint for JavaScript, Vet for Go, and PMD originally for Java. These can prevent many runtime exceptions.
  • Review of Java Static Analysis Tools
    2 projects | dev.to | 9 Mar 2021
    PMD scans Java source code and looks for potential problems.
  • Java Code Quality Tools Recommended by Developers
    4 projects | dev.to | 7 Feb 2021
    PMD analyzes Java source code, validates it with its list of rules, and reports offending lines to the user. PMD can determine common issues such as the hard coding of passwords and IP addresses, the use of the forEach loop instead of a traditional for loop, and code that seems to violate the Law of Demeter or implement the God Class anti-pattern.

What are some alternatives?

When comparing Checkstyle and PMD you can also consider the following projects:

Spotbugs - SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.

SonarQube - Continuous Inspection

Error Prone - Catch common Java mistakes as compile-time errors

infer - A static analyzer for Java, C, C++, and Objective-C

SonarJava - :coffee: SonarSource Static Analyzer for Java Code Quality and Security

Spoon - Spoon is a metaprogramming library to analyze and transform Java source code. :spoon: is made with :heart:, :beers: and :sparkles:. It parses source files to build a well-designed AST with powerful analysis and transformation API.

FindBugs - The new home of the FindBugs project