Java

The Best Java Static Analysis Tools (Linters/Formatters)

We rank 112 Java linters, code analyzers, formatters, and more. Find and compare tools like Mega-Linter, Teamscale, Semgrep, and more. Please rate and review tools that you've used. This helps others find the best tools for their projects.

27 Java Tools

CogniCrypt

Checks Java source and byte code for incorrect uses of cryptographic APIs.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

checkstyle

Checking Java source code for adherence to a Code Standard or set of validation rules (best practices).

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Checker Framework

Pluggable type-checking for Java.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Spoon

Spoon is a metaprogramming library to analyze and transform Java source code (incl Java 9, 10, 11, 12, 13, 14). It parses source files to build a well-designed AST with powerful analysis and transformation API. Can be integrated in Maven and Gradle.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedformatter
  • 100% upvoted

SpotBugs

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

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Error-prone

Catch common Java mistakes as compile-time errors.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Soot

A framework for analyzing and transforming Java and Android applications.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

google-java-format

Reformats Java source code to comply with Google Java Style

  • MaintainedMaintained
  • MaintainedJava
  • MaintainedcliMaintainedide-plugin
  • Maintainedformatter
  • 100% upvoted

ckjm

Calculates Chidamber and Kemerer object-oriented metrics by processing the bytecode of compiled Java files.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Doop

Doop is a declarative framework for static analysis of Java/Android programs, centered on pointer analysis algorithms. Doop provides a large variety of analyses and also the surrounding scaffolding to run an analysis end-to-end (fact generation, processing, statistics, etc.).

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

fb-contrib

A plugin for FindBugs with additional bug detectors.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

JArchitect

Measure, query and visualize your code and avoid unexpected issues, technical debt and complexity.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

NullAway

Type-based null-pointer checker with low build-time overhead; an Error Prone plugin.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

ck

Calculates Chidamber and Kemerer object-oriented metrics by processing the source Java files.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

DesigniteJava

DesigniteJava supports detection of various architecture, design, and implementation smells along with computation of various code quality metrics.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

Diffblue

Diffblue is a software company that provides AI-powered code analysis and testing solutions for software development teams. Its technology helps developers automate testing, find bugs, and reduce manual labor in their software development processes. The company's main product, Diffblue Cover, uses AI to generate and run unit tests for Java code, helping to catch errors and improve code quality.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedservice
  • Maintainedlinter
  • 0% upvoted

forbidden-apis

Detects and forbids invocations of specific method/class/field (like reading from a text stream without a charset). Maven/Gradle/Ant compatible.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

IntelliJ IDEA

Comes bundled with a lot of inspections for Java and Kotlin and includes tools for refactoring, formatting and more.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedide-plugin
  • Maintainedformatter
  • 0% upvoted

JBMC

Bounded model-checker for Java (bytecode), verifies user-defined assertions, standard assertions, several coverage metric analyses.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

Mariana Trench

Our security focused static analysis tool for Android and Java applications. Mariana Trench analyzes Dalvik bytecode and is built to run fast on large codebases (10s of millions of lines of code). It can find vulnerabilities as code changes, before it ever lands in your repository.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

OWASP Dependency Check

Checks dependencies for known, publicly disclosed, vulnerabilities.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

qulice

Combines a few (pre-configured) static analysis tools (checkstyle, PMD, Findbugs, ...).

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

steady

Analyses your Java applications for open-source dependencies with known vulnerabilities, using both static analysis and testing to determine code context and usage for greater accuracy.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

Violations Lib

Java library for parsing report files from static code analysis. Used by a bunch of Jenkins, Maven and Gradle plugins.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

Java PathFinder

An extensible software model checking framework for Java bytecode programs.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

Parasoft Jtest

Jtest is an automated Java software testing and static analysis product that is made by Parasoft. The product includes technology for Data-flow analysis Unit test-case generation and execution, static analysis, regression testing, code coverage, and runtime error detection.

  • MaintainedMaintained
  • MaintainedJava
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted

HuntBugs

Bytecode static analyzer tool based on Procyon Compiler Tools aimed to supersede FindBugs.

  • DeprecatedDeprecated
  • DeprecatedJava
  • Deprecatedcli
  • Deprecatedlinter
  • 0% upvoted

85 Multi-Language Tools

Mega-Linter

Mega-Linter can handle any type of project thanks to its 70+ embedded Linters, its advanced reporting, runnable on any CI system or locally, with assisted installation and configuration, able to apply formatting and fixes

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 68% upvoted

Teamscale

Static and dynamic analysis tool supporting more than 25 languages and direct IDE integration. Free hosting for Open Source projects available on request. Free academic licenses available.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • MaintainedserviceMaintainedide-plugin
  • Maintainedlinter
  • 79% upvoted

Semgrep

Sponsor

A fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time. Its rules look like the code you already write; no abstract syntax trees or regex wrestling. Supports 17+ languages.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • MaintainedcliMaintainedservice
  • Maintainedlinter
  • 80% upvoted

Sonatype

Reports known vulnerabilities in common dependencies and recommends updated packages to minimize breaking changes

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 85% upvoted

SonarQube

SonarQube is an open platform to manage code quality.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 68% upvoted

ThreatMapper

Vulnerability Scanner and Risk Evaluation for containers, serverless and hosts at runtime. ThreatMapper generates runtime BOMs from dependencies and operating system packages, matches against multiple threat feeds, scans for unprotected secrets, and scores issues based on severity and risk-of-exploit.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 94% upvoted

CodeScene

Sponsor

CodeScene is a quality visualization tool for software. Prioritize technical debt, detect delivery risks, and measure organizational aspects. Fully automated.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 69% upvoted

PVS-Studio

A (conditionally free for FOSS and individual developers) static analysis of C, C++, C# and Java code. For advertising purposes you can propose a large FOSS project for analysis by PVS employees. Supports CWE mapping, OWASP ASVS, MISRA, AUTOSAR and SEI CERT coding standards.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 89% upvoted

Coverity

Synopsys Coverity supports 20 languages and over 70 frameworks including Ruby on rails, Scala, PHP, Python, JavaScript, TypeScript, Java, Fortran, C, C++, C#, VB.NET.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 69% upvoted

DeepCode

Sponsor

DeepCode was acquired by Snyk is now Snyk Code.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 64% upvoted

Better Code Hub

Better Code Hub checks your GitHub codebase against 10 engineering guidelines devised by the authority in software quality, Software Improvement Group.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 79% upvoted

Infer

A static analyzer for Java, C and Objective-C

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 87% upvoted

trunk

Modern repositories include many technologies, each with its own set of linters. With 30+ linters and counting, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • MaintainedlinterMaintainedformatter
  • 82% upvoted

PMD

A source code analyzer for Java, Salesforce Apex, Javascript, PLSQL, XML, XSL and others.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 85% upvoted

ArchUnit

Unit test your Java or Kotlin architecture.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

codeql

Deep code analysis - semantic queries and dataflow for several languages with VSCode plugin support.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • MaintainedserviceMaintainedide-plugin
  • Maintainedlinter
  • 100% upvoted

Codeac

Automated code review tool integrates with GitHub, Bitbucket and GitLab (even self-hosted). Available for JavaScript, TypeScript, Python, Ruby, Go, PHP, Java, Docker, and more. (open-source free)

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 88% upvoted

Klocwork

Quality and Security Static analysis for C/C++, Java and C#.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Scanmycode CE (Community Edition)

Scanmycode - Code Scanning/SAST/Linting using many tools/Scanners with One Report

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Application Inspector

Commercial Static Code Analysis which generates exploits to verify vulnerabilities.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 75% upvoted

Axivion Bauhaus Suite

Tracks down error-prone code locations, style violations, cloned or dead code, cyclic dependencies and more for C/C++, C#/.NET, Java and Ada 83/Ada 95.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 83% upvoted

Checkmarx CxSAST

Commercial Static Code Analysis which doesn't require pre-compilation.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 54% upvoted

CodeSonar from GrammaTech

Advanced, whole program, deep path, static analysis of C, C++, Java and C# with easy-to-understand explanations and code and path visualization.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 75% upvoted

Codiga

Sponsor

Automated Code Reviews and Technical Debt management platform that supports 12+ languages.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Codacy

Code Analysis to ship Better Code, Faster.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 60% upvoted

Find Security Bugs

The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 71% upvoted

Fortify

A commercial static analysis platform that supports the scanning of C/C++, C#, VB.NET, VB6, ABAP/BSP, ActionScript, Apex, ASP.NET, Classic ASP, VB Script, Cobol, ColdFusion, HTML, Java, JS, JSP, MXML/Flex, Objective-C, PHP, PL/SQL, T-SQL, Python (2.6, 2.7), Ruby (1.9.3), Swift, Scala, VB, and XML.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedide-plugin
  • Maintainedlinter
  • 55% upvoted

Unibeautify

Universal code beautifier with a GitHub app. Supports HTML, CSS, JavaScript, TypeScript, JSX, Vue, C++, Go, Objective-C, Java, Python, PHP, GraphQL, Markdown, and more.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • MaintainedcliMaintainedservice
  • Maintainedformatter
  • 67% upvoted

Android Studio

Based on IntelliJ IDEA, and comes bundled with tools for Android including Android Lint.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedide-plugin
  • Maintainedlinter
  • 100% upvoted

Kiuwan

Identify and remediate cyber threats in a blazingly fast, collaborative environment, with seamless integration in your SDLC. Python, C\C++, Java, C#, PHP and more.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 63% upvoted

Offensive 360

Sponsor

Commercial Static Code Analysis system doesn't require building the source code or pre-compilation.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Svace

Static code analysis tool for Java,C,C++,C#,Go.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

todocheck

Linter for integrating annotated TODOs with your issue trackers

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 67% upvoted

AppChecker

Static analysis for C/C++/C#, PHP and Java.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

ApplicationInspector

Creates reports of over 400 rule patterns for feature detection (e.g. the use of cryptography or version control in apps).

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 60% upvoted

Atom-Beautify

Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom editor.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedide-plugin
  • Maintainedlinter
  • 56% upvoted

HCL AppScan Source

Commercial Static Code Analysis.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 57% upvoted

Hopper

A static analysis tool written in scala for languages that run on JVM.

  • DeprecatedDeprecated
  • DeprecatedMulti-Language
  • Deprecatedcli
  • Deprecatedlinter
  • 100% upvoted

lizard

Lizard is an extensible Cyclomatic Complexity Analyzer for many programming languages including C/C++ (doesn't require all the header files or Java imports). It also does copy-paste detection (code clone detection/code duplicate detection) and many other forms of static code analysis. Counts lines of code without comments, CCN (cyclomatic complexity number), token count of functions, parameter count of functions.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

pfff

Facebook's tools for code analysis, visualizations, or style-preserving source transformation for many languages.

  • DeprecatedDeprecated
  • DeprecatedMulti-Language
  • Deprecatedcli
  • Deprecatedformatter
  • 60% upvoted

pre-commit

A framework for managing and maintaining multi-language pre-commit hooks.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Scrutinizer

A proprietary code quality checker that can be integrated with GitHub.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Security Code Scan

Security code analyzer for C# and VB.NET. Detects various security vulnerability patterns: SQLi, XSS, CSRF, XXE, Open Redirect, etc. Integrates into Visual Studio 2015 and newer. Detects various security vulnerability patterns: SQLi, XSS, CSRF, XXE, Open Redirect, etc.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedide-plugin
  • Maintainedlinter
  • 100% upvoted

Sigrid

Sigrid helps you to improve your software by measuring your system's code quality, and then compares the results against a benchmark of thousands of industry systems to give you concrete advice on areas where you can improve.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • MaintainedcliMaintainedservice
  • Maintainedlinter
  • 100% upvoted

Snyk Code

Snyk Code finds security vulnerabilities based on AI. Its speed of analysis allow us to analyse your code in real time and deliver results when you hit the save button in your IDE. Supported languages are Java, JavaScript, Python, PHP, C#, Go and TypeScript. Integrations with GitHub, BitBucket and Gitlab. It is free to try and part of the Snyk platform also covering SCA, containers and IaC.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedservice
  • Maintainedlinter
  • 100% upvoted

Soto Platform

Suite of static analysis tools consisting of the three components Sotoarc (Architecture Analysis), Sotograph (Quality Analysis), and Sotoreport (Quality report). Helps find differences between architecture and implementation, interface violations (e.g. external access of private parts of subsystems, detection of all classes, files, packages and subsystems which are strongly coupled by cyclical relationships and more. The Sotograph product family runs on Windows and Linux.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Undebt

Language-independent tool for massive, automatic, programmable refactoring based on simple pattern definitions.

  • MaintainedMaintained
  • MaintainedMulti-Language
  • Maintainedcli
  • Maintainedlinter
  • 100% upvoted

Upsource

Code review tool with static code analysis and code-aware navigation for Java, PHP, JavaScript and Kotlin.

  • java