2500 lines
69 KiB
HTML
2500 lines
69 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta name="description" content="">
|
||
<meta name="keywords" content="userdocstools, ">
|
||
<title>Tools / Integrations | PMD Source Code Analyzer</title>
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" href="assets/fontawesome-free-5.15.4-web/css/all.min.css">
|
||
<link rel="stylesheet" type="text/css" href="assets/bootstrap-4.5.2-dist/css/bootstrap.min.css">
|
||
|
||
<link rel="stylesheet" type="text/css" href="css/syntax.css">
|
||
<link rel="stylesheet" type="text/css" href="css/modern-business.css">
|
||
<link rel="stylesheet" type="text/css" href="css/customstyles.css">
|
||
<link rel="stylesheet" type="text/css" href="css/theme-green.css">
|
||
<link rel="stylesheet" type="text/css" href="css/pmd-customstyles.css">
|
||
|
||
<link rel="shortcut icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||
<link rel="icon" href="images/logo/favicon.ico" type="image/x-icon">
|
||
|
||
<link rel="alternate" type="application/rss+xml" title="" href="feed.xml">
|
||
|
||
</head>
|
||
<body>
|
||
<!-- Content is offset by the height of the topnav bar. -->
|
||
<!-- There's already a padding-top rule in modern-business.css, but it apparently doesn't work on Firefox 60 and Chrome 67 -->
|
||
<div id="topbar-content-offset">
|
||
<!-- Navigation -->
|
||
<nav class="navbar navbar-expand-lg fixed-top navbar-dark">
|
||
<div class="container topnavlinks">
|
||
<a class="navbar-brand fas fa-home fa-lg" href="index.html"> <span class="projectTitle"> PMD Source Code Analyzer Project</span></a>
|
||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||
<span class="navbar-toggler-icon"></span>
|
||
</button>
|
||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||
<ul class="navbar-nav mr-auto mt-2 mt-lg-0"></ul>
|
||
<ul class="navbar-nav">
|
||
<!-- toggle sidebar button -->
|
||
<li class="nav-item"><a id="tg-sb-link" class="nav-link" href="#"><i id="tg-sb-icon" class="fas fa-toggle-on"></i> Nav</a></li>
|
||
<!-- entries without drop-downs appear here -->
|
||
|
||
|
||
|
||
<li class="nav-item"><a class="nav-link" href="https://github.com/pmd/pmd/releases/latest" target="_blank">Download</a></li>
|
||
|
||
|
||
|
||
<li class="nav-item"><a class="nav-link" href="https://github.com/pmd/pmd" target="_blank">Fork us on github</a></li>
|
||
|
||
|
||
|
||
<!-- entries with drop-downs appear here -->
|
||
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
|
||
|
||
</ul>
|
||
<form class="form-inline my-2 my-lg-0">
|
||
<input class="form-control mr-sm-2" type="search" placeholder="search..." id="search-input">
|
||
<ul id="results-container"></ul>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- Page Content -->
|
||
<div class="container-toc-wrapper">
|
||
<div class="container">
|
||
<div class="col-lg-12"> </div>
|
||
<!-- Content Row -->
|
||
<div class="row">
|
||
|
||
|
||
<!-- Sidebar Column -->
|
||
<div class="col-md-3" id="tg-sb-sidebar">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ul id="mysidebar" class="nav">
|
||
<li class="sidebarTitle">PMD 7.8.0-SNAPSHOT</li>
|
||
<div class="sidebarTitleDate">Release date: 29-November-2024</div>
|
||
|
||
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">About</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="index.html">Home</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_release_notes.html">Release notes</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_release_notes_pmd7.html">Release notes (PMD 7)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_help.html">Getting help</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_release_policies.html">Release policies</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_about_support_lifecycle.html">Support lifecycle</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">User Documentation</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_migrating_to_pmd7.html">Migration Guide for PMD 7</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_installation.html">Installation and basic CLI usage</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_making_rulesets.html">Making rulesets</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_configuring_rules.html">Configuring rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_best_practices.html">Best practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_suppressing_warnings.html">Suppressing warnings</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_incremental_analysis.html">Incremental analysis</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_cli_reference.html">PMD CLI reference</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_report_formats.html">PMD Report formats</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_3rdpartyrulesets.html">3rd party rulesets</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">CPD reference</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_cpd.html">Copy-paste detection</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_cpd_report_formats.html">CPD Report formats</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Extending PMD</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_writing_rules_intro.html">Introduction to writing rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_your_first_rule.html">Your first rule</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_writing_xpath_rules.html">XPath rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_writing_java_rules.html">Java rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_designer_reference.html">Rule designer reference</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_defining_properties.html">Defining rule properties</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_rule_guidelines.html">Rule guidelines</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_testing.html">Testing your rules</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_extending_ast_dump.html">Creating (XML) dump of the AST</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Tools / Integrations</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_maven.html">Maven PMD Plugin</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_gradle.html">Gradle</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_ant.html">Ant</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_java_api.html">PMD Java API</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_bld.html">bld PMD Extension</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_userdocs_tools_ci.html">CI integrations</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li class="active"><a href="pmd_userdocs_tools.html">Other Tools / Integrations</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">Rule Reference</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Apex Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_documentation.html">Documentation</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_performance.html">Performance</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_apex_security.html">Security</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">HTML Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_html.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_html_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Java Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_documentation.html">Documentation</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_multithreading.html">Multithreading</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_performance.html">Performance</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_java_security.html">Security</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Java Server Pages Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_jsp_security.html">Security</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">JavaScript Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_ecmascript.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_ecmascript_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_ecmascript_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_ecmascript_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_ecmascript_performance.html">Performance</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Kotlin Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_kotlin_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Maven POM Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_pom.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_pom_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Modelica Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_modelica.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_modelica_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">PLSQL Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_plsql.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_plsql_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_plsql_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_plsql_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_plsql_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Salesforce Visualforce Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_visualforce.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_visualforce_security.html">Security</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Scala Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_scala.html">Index</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Swift Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_swift_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Velocity Template Language (VTL) Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_design.html">Design</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_velocity_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">WSDL Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_wsdl.html">Index</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">XML Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xml.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xml_bestpractices.html">Best Practices</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xml_errorprone.html">Error Prone</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">XSL Rules</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xsl.html">Index</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xsl_codestyle.html">Code Style</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_rules_xsl_performance.html">Performance</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">Language-Specific Documentation</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_index.html">Overview</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_configuration.html">Language configuration</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_apex.html">Apex</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_cpp.html">C/C++</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_cs.html">C#</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_coco.html">Coco</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_dart.html">Dart</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_fortran.html">Fortran</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_gherkin.html">Gherkin</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_go.html">Go</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_html.html">HTML</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_java.html">Java</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_js_ts.html">JavaScript / TypeScript</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_jsp.html">JSP</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_julia.html">Julia</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_kotlin.html">Kotlin</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_lua.html">Lua</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_matlab.html">Matlab</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_modelica.html">Modelica</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_objectivec.html">Objective-C</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_perl.html">Perl</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_php.html">PHP</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_plsql.html">PLSQL</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_python.html">Python</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_ruby.html">Ruby</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_scala.html">Scala</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_swift.html">Swift</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_tsql.html">T-SQL</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_visualforce.html">Visualforce</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_velocity.html">Velocity Template Language (VTL)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_languages_xml.html">XML and XML dialects</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">Developer Documentation</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_development.html">Developer resources</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_building.html">Building PMD from source</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="https://github.com/pmd/pmd/blob/main/CONTRIBUTING.md" target="_blank">Contributing</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_writing_documentation.html">Writing documentation</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_roadmap.html">Roadmap</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_how_pmd_works.html">How PMD works</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_pmdtester.html">Pmdtester</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_rule_deprecation_policy.html">Rule Deprecation Policy</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Major contributions</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_rule_guidelines.html">Rule Guidelines</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_adding_new_language_javacc.html">Adding a new language (JavaCC)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_adding_new_language_antlr.html">Adding a new language (ANTLR)</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_devdocs_major_adding_new_cpd_language.html">Adding a new CPD language</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Experimental features</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="tag_experimental.html">List of experimental Features</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
|
||
<a href="#">Project documentation</a>
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Trivia about PMD</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_trivia_news.html">PMD in the press</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_trivia_products.html">Products & books related to PMD</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_trivia_similarprojects.html">Similar projects</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_trivia_meaning.html">What does 'PMD' mean?</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_logo.html">Logo</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_faq.html">FAQ</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="license.html">License</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_credits.html">Credits</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_release_notes_old.html">Old release notes</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_decisions.html">Decisions</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="subfolders">
|
||
<a href="#">Project management</a>
|
||
<ul>
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_committers_infrastructure.html">Infrastructure</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_committers_releasing.html">Release process</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_committers_merging_pull_requests.html">Merging pull requests</a></li>
|
||
|
||
|
||
|
||
|
||
|
||
<li><a href="pmd_projectdocs_committers_main_landing_page.html">Main Landing page</a></li>
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</li>
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
</div>
|
||
|
||
|
||
|
||
<!-- Content Column -->
|
||
<div class="col-md-9" id="tg-sb-content">
|
||
<header>
|
||
<div class="row">
|
||
<div class="col-lg-12">
|
||
<a href="./" role="button"
|
||
><i class="fa fa-home fa-lg"></i
|
||
></a>
|
||
» Tools / Integrations
|
||
<a
|
||
target="_blank"
|
||
href="https://github.com/pmd/pmd/blob/main/docs/pages/pmd/userdocs/tools/tools.md"
|
||
class="float-right"
|
||
role="button"
|
||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||
>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<hr />
|
||
</header>
|
||
|
||
|
||
<div class="post-header">
|
||
<h1 class="post-title-main">Tools / Integrations</h1>
|
||
</div>
|
||
|
||
<div class="post-content" data-github-edit-url="https://github.com/pmd/pmd/blob/main/docs/pages/pmd/userdocs/tools/tools.md">
|
||
|
||
|
||
<details id="inline-toc-details">
|
||
<summary>Table of Contents</summary>
|
||
<div id="inline-toc"><!-- empty, move TOC here when screen size too small --></div>
|
||
</details>
|
||
|
||
<h2 id="automated-code-review">Automated Code Review</h2>
|
||
|
||
<div class="alert alert-info" role="alert"><i class="fas fa-info-circle"></i> <b>Note:</b> The tools are listed in alphabetical order without rating.</div>
|
||
|
||
<h3 id="codacy">Codacy</h3>
|
||
|
||
<p><a href="https://www.codacy.com/">Codacy</a> automates code reviews and monitors code quality on every commit and pull request.
|
||
It gives visibility into the technical debt and can track code style and security issues, code coverage, code
|
||
duplication, cyclomatic complexity and enforce best practices.
|
||
Codacy is static analysis without the hassle.</p>
|
||
|
||
<p>With Codacy you have PMDJava analysis out-of-the-box, and it is free for open source projects.</p>
|
||
|
||
<ul>
|
||
<li>Homepage: <a href="https://www.codacy.com/">https://www.codacy.com/</a></li>
|
||
<li>Source code: <a href="https://github.com/codacy/codacy-pmdjava">https://github.com/codacy/codacy-pmdjava</a></li>
|
||
<li>Maintainer: Codacy</li>
|
||
</ul>
|
||
|
||
<h3 id="codety">Codety</h3>
|
||
|
||
<p><a href="https://www.codety.io/">Codety</a> provides comprehensive code scanning solution designed to detect code issues for
|
||
30+ programming languages and IaC frameworks. It embeds more than 6,000 code analysis rules (including pmd rules)
|
||
and can detect code smells, vulnerable code, secrets in the code, performance issues, style violations, and more.</p>
|
||
|
||
<p>Codety Scanner provides out-of-the-box PMD integration, it is free for personal and commercial use.</p>
|
||
|
||
<ul>
|
||
<li>Homepage: <a href="https://www.codety.io/">https://www.codety.io/</a></li>
|
||
<li>Source code: <a href="https://github.com/codetyio/codety-scanner">https://github.com/codetyio/codety-scanner</a></li>
|
||
</ul>
|
||
|
||
<h3 id="codiga">Codiga</h3>
|
||
|
||
<p><a href="https://www.codiga.io">Codiga</a> automates code review, check your code quality and helps you manage your
|
||
technical debt. It is integrated with GitHub, GitLab and Bitbucket. The platform also analyzes code directly in
|
||
your IDE using its integration plugins for VS Code and IntelliJ, providing a consistent analysis along your
|
||
development cycle (from the IDE to the CI/CD pipeline).</p>
|
||
|
||
<p>Codiga uses PMD to check Java and Apex code.</p>
|
||
|
||
<ul>
|
||
<li>Homepage: <a href="https://www.codiga.io">https://www.codiga.io</a></li>
|
||
<li>Documentation: <a href="https://doc.codiga.io">https://doc.codiga.io</a></li>
|
||
</ul>
|
||
|
||
<h3 id="github-actions">GitHub Actions</h3>
|
||
|
||
<p>PMD provides its own GitHub Action, that can be integrated in custom workflows.</p>
|
||
|
||
<p>It can execute PMD with your own ruleset against your project. It creates a
|
||
<a href="https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html">SARIF</a> report which is uploaded as a
|
||
build artifact. Furthermore, the build can be failed based on the number of violations.</p>
|
||
|
||
<p>The action can also be used as a code scanner to create “Code scanning alerts”.</p>
|
||
|
||
<ul>
|
||
<li>Homepage: <a href="https://github.com/pmd/pmd-github-action">https://github.com/pmd/pmd-github-action</a></li>
|
||
</ul>
|
||
|
||
<h3 id="tca">TCA</h3>
|
||
|
||
<p><a href="http://tca.tencent.com/">Tencent Cloud Code Analysis</a> (TCA for short, code-named CodeDog inside the company early)
|
||
is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and
|
||
client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis
|
||
tools in various programming languages.</p>
|
||
|
||
<p>Using TCA can help team find normative, structural, security vulnerabilities and other issues in the code,
|
||
continuously monitor the quality of the project code and issue alerts. At the same time, TCA opens up APIs to
|
||
support connection with upstream and downstream systems, so as to integrate code analysis capabilities, ensure
|
||
code quality, and be more conducive to inheriting an excellent team code culture.</p>
|
||
|
||
<p>With TCA you have PMD analysis out-of-the-box, and it is open source under the MIT license.</p>
|
||
|
||
<ul>
|
||
<li>Homepage: <a href="https://tca.tencent.com/">https://tca.tencent.com/</a></li>
|
||
<li>Source code: <a href="https://github.com/Tencent/CodeAnalysis">https://github.com/Tencent/CodeAnalysis</a></li>
|
||
<li>Documentation: <a href="https://tencent.github.io/CodeAnalysis">https://tencent.github.io/CodeAnalysis</a></li>
|
||
<li>Maintainer: TCA</li>
|
||
</ul>
|
||
|
||
<h2 id="ide-integrations">IDE Integrations</h2>
|
||
|
||
<h3 id="summary">Summary</h3>
|
||
|
||
<table>
|
||
<tr>
|
||
<th>IDE</th>
|
||
<th>Homepage</th>
|
||
<th>Source Code</th>
|
||
<th>Maintainers</th>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#bluej">BlueJ</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-misc/tree/main/pmd-bluej/">pmd-bluej</a></td>
|
||
<td><a href="http://tomcopeland.blogs.com/">Tom Copeland</a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#code-guide">CodeGuide</a></td>
|
||
<td></td>
|
||
<td>N/A</td>
|
||
<td>Austin Moore</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#eclipse">Eclipse</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-eclipse-plugin">github: pmd/pmd-eclipse</a></td>
|
||
<td>Philippe Herlin</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>qa-Eclipse</td>
|
||
<td></td>
|
||
<td><a href="https://github.com/ChristianWulf/qa-eclipse-plugin">qa-Eclipse</a></td>
|
||
<td>Christian Wulf</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>eclipse-pmd</td>
|
||
<td><a href="http://acanda.github.io/eclipse-pmd/">http://acanda.github.io/eclipse-pmd/</a></td>
|
||
<td><a href="https://github.com/acanda/eclipse-pmd/">github: acanda/eclipse-pmd</a></td>
|
||
<td>Philip Graf</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#emacs">Emacs</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-emacs/">github: pmd/pmd-emacs</a></td>
|
||
<td>Nascif Abousalh Neto</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#gel">Gel</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-misc/tree/main/pmd-gel/">github: pmd/pmd-misc/pmd-gel</a></td>
|
||
<td>Andrei Lumianski</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td>Gradle</td>
|
||
<td><a href="https://docs.gradle.org/current/userguide/pmd_plugin.html">Gradle: The PMD Plugin</a></td>
|
||
<td><a href="https://github.com/gradle/gradle/tree/master/subprojects/code-quality">github: gradle/gradle</a></td>
|
||
<td><a href="https://gradle.org/">Gradle.org</a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#idea">IntelliJ IDEA</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/amitdev/PMD-Intellij">github: amitdev/PMD-Intellij</a></td>
|
||
<td>Amit Dev</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#idea---qaplug">IntelliJ IDEA - QAPlug</a></td>
|
||
<td><a href="http://qaplug.com/">http://qaplug.com/</a></td>
|
||
<td>N/A</td>
|
||
<td>Jakub Sławiński</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#jbuilder">JBuilder</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-misc/tree/main/pmd-jbuilder/">github: pmd/pmd-misc/pmd-jbuilder</a></td>
|
||
<td><a href="http://tomcopeland.blogs.com/">Tom Copeland</a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#jcreator">JCreator</a></td>
|
||
<td></td>
|
||
<td>N/A</td>
|
||
<td>Brant Gurganus</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#jdeveloper">JDeveloper</a></td>
|
||
<td></td>
|
||
<td><a href="https://github.com/pmd/pmd-jdeveloper">github: pmd/pmd-jdeveloper</a></td>
|
||
<td><a href="http://develishdevelopment.wordpress.com/">Torsten Kleiber</a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#jedit">JEdit</a></td>
|
||
<td><a href="http://plugins.jedit.org/plugins/?PMDPlugin">jEdit - PMD Plugin</a></td>
|
||
<td><a href="https://sourceforge.net/p/jedit/PMDPlugin/ci/master/tree/">sourceforge: jedit/PMDPlugin</a></td>
|
||
<td>Jiger Patel, Dale Anson</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#netbeans">NetBeans</a></td>
|
||
<td><a href="http://kenai.com/projects/sqe/">SQE</a></td>
|
||
<td><a href="https://github.com/sqe-team/sqe">github: sqe-team/sqe</a></td>
|
||
<td>N/A</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#textpad">TextPad</a></td>
|
||
<td></td>
|
||
<td>N/A</td>
|
||
<td>Jeff Epstein</td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<td><a href="#weblogic-workshop-81x">WebLogic Workshop 8.1.x</a></td>
|
||
<td></td>
|
||
<td>N/A</td>
|
||
<td>Kevin Conaway</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<h3 id="general-comments">General comments</h3>
|
||
|
||
<p>A general note - most plugins include the PMD jar files, which has the rulesets
|
||
inside it. So even though the rulesets parameter that some plugins
|
||
use (i.e., “rulesets/java/unusedcode.xml”) looks like a filesystem reference, it’s really
|
||
being used by a getResourceAsStream() call to load it out of the PMD jar files.</p>
|
||
|
||
<h3 id="bluej">BlueJ</h3>
|
||
|
||
<p><a href="http://bluej.org/">BlueJ</a> is a teaching IDE. To install the PMD extension for BlueJ, download
|
||
the <a href="http://sourceforge.net/projects/pmd/files/pmd-bluej/pmd-bluej-1.0/">PMDExtension jar file</a>
|
||
and place it in your <code class="language-plaintext highlighter-rouge">bluej/lib/extensions/</code> directory.</p>
|
||
|
||
<h3 id="eclipse">Eclipse</h3>
|
||
|
||
<p>To install the PMD plugin for Eclipse:</p>
|
||
|
||
<ul>
|
||
<li>Start Eclipse and open a project</li>
|
||
<li>Select “Help”->”Software Updates”->”Find and Install”</li>
|
||
<li>Click “Next”, then click “New remote site”</li>
|
||
<li>Enter “PMD” into the Name field and <a href="https://pmd.github.io/pmd-eclipse-plugin-p2-site/">https://pmd.github.io/pmd-eclipse-plugin-p2-site/</a> into the URL field</li>
|
||
<li>Click through the rest of the dialog boxes to install the plugin</li>
|
||
</ul>
|
||
|
||
<p>Alternatively, you can download the latest zip file and follow the above procedures
|
||
except for using “New local site” and browsing to the downloaded zip file.</p>
|
||
|
||
<p>To configure PMD, select “Windows”->”Preferences”, then select PMD.</p>
|
||
|
||
<p>To run PMD, right-click on a project node and select “PMD”->”Check code with PMD”.</p>
|
||
|
||
<p>To run the duplicate code detector, right-click on a project node and
|
||
select “PMD”->”Find suspect cut and paste”. The report will be placed in a “reports” directory
|
||
in a file called “cpd-report.txt”.</p>
|
||
|
||
<p>To find additional help for other features, please read included help by selecting
|
||
Help->Help Contents and browse the “How to…” section in the “PMD Plugin Documentation” book.</p>
|
||
|
||
<p>After installing an update, if you get an Exception such as
|
||
“java.lang.RuntimeException: Couldn’t find that class xxxxx”,
|
||
try deleting the ruleset.xml file in the .metadata/plugins/net.sourceforge.pmd.eclipse directory in your workspace.</p>
|
||
|
||
<p>To get Eclipse to not flag the @SuppressWarnings(“PMD”) annotation, look
|
||
under the menu headings Java -> Compiler -> Errors/Warnings -> Annotations -> Unhandled Warning Token.</p>
|
||
|
||
<h3 id="emacs">Emacs</h3>
|
||
|
||
<p>Integration with GNU Emacs is performed through an ELisp package, pmd.el.
|
||
It supports two commands, “pmd-current-buffer” and “pmd-current-dir”.
|
||
The output is captured in a compilation buffer which allows the user to “jump”
|
||
directly to the source code position associated with the PMD warnings.</p>
|
||
|
||
<h3 id="gel">Gel</h3>
|
||
|
||
<p>Here’s how to set up the Gel plugin:</p>
|
||
|
||
<ul>
|
||
<li>Download the pmd-gel-[version].zip file</li>
|
||
<li>Close Gel</li>
|
||
<li>Remove any old plugin versions from your gel\plugins directory</li>
|
||
<li>Unzip the new zip file into your gel\plugins directory</li>
|
||
<li>Start Gel</li>
|
||
<li>Go to Tools->Options->Plugin</li>
|
||
<li>Select the PMD plugin and click “Remove”</li>
|
||
<li>Click “Add” and select “net.sourceforge.pmd.gel.PMDPlugin”</li>
|
||
<li>Restart Gel</li>
|
||
</ul>
|
||
|
||
<p>That’s pretty much it. Now you can open a Java project and click on Plugins->PMD and
|
||
a configuration panel will pop up. You can pick which ruleset you want to run and
|
||
you can also pick whether you want to run PMD on the current file or on every
|
||
source file in your project.</p>
|
||
|
||
<h3 id="idea">IDEA</h3>
|
||
|
||
<p>You can use an integrated plugin or just use it as an IDEA “External Tool”.</p>
|
||
|
||
<p>Amit Dev wrote an integrated plugin for IDEA; you can download that
|
||
<a href="http://plugins.jetbrains.com/idea/plugin/1137-pmdplugin">from the IntelliJ plugins site</a>.</p>
|
||
|
||
<p>Here’s how to set it up as an “External Tool”:</p>
|
||
|
||
<ul>
|
||
<li>Open IDEA and go to File->Settings</li>
|
||
<li>Click on the “External Tools” icon</li>
|
||
<li>Click on the Add button</li>
|
||
<li>Fill in the blocks
|
||
<ul>
|
||
<li>Name: PMD</li>
|
||
<li>Description: PMD, good for what ails you.</li>
|
||
<li>Menu: Select the “Main menu”, “Project views”, “Editor menu”, and “Search results” checkboxes.</li>
|
||
<li>Program: <code class="language-plaintext highlighter-rouge">c:\pmd\bin\pmd.bat</code></li>
|
||
<li>For the next parameter you’ll need to plug in the location of your PMD installation
|
||
and the rulesets you want to use</li>
|
||
<li>Parameters:
|
||
<code class="language-plaintext highlighter-rouge">-d "$FilePath$" -f ideaj -R rulesets/java/quickstart.xml -P sourcePath="$Sourcepath$" -P classAndMethodName=$FileClass$.method -P fileName=$FileName$</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
|
||
<p>That’s pretty much it. Now you can right click on a source directory and select PMD,
|
||
it’ll run recursively on the source files, and the results should
|
||
be displayed in a window and hyperlinked into the correct file and line of code. I usually
|
||
right-click on the message window title bar and unselect “autohide” so the window doesn’t go
|
||
away every time I fix something in the code window.</p>
|
||
|
||
<h3 id="idea---qaplug">IDEA - QAPlug</h3>
|
||
|
||
<p>QAPlug is an Intellij IDEA plugin to manage code quality. It integrates no less than Checkstyle, FindBugs, and PMD.</p>
|
||
|
||
<p>The plugin is available at <a href="http://www.qaplug.com/">http://www.qaplug.com/</a>.</p>
|
||
|
||
<p>Also available at the JetBrains site, <a href="http://plugins.jetbrains.com/idea/plugin/4596-qaplug--pmd">QAPlug-PMD</a>
|
||
and <a href="http://plugins.jetbrains.com/idea/plugin/4594-qaplug">QAPlug</a>.</p>
|
||
|
||
<h3 id="jbuilder">JBuilder</h3>
|
||
|
||
<p>To enable this OpenTool in JBuilder:</p>
|
||
|
||
<ul>
|
||
<li>Download the <a href="https://sourceforge.net/projects/pmd/files/pmd-jbuilder/">latest binary release</a></li>
|
||
<li>Unzip it into your <code class="language-plaintext highlighter-rouge">jbuilder/lib/ext/</code> directory</li>
|
||
<li>Restart JBuilder</li>
|
||
</ul>
|
||
|
||
<p>What you can do:</p>
|
||
|
||
<ul>
|
||
<li>Check a single file by bringing up the context menu from the file tab and selecting PMDCheck</li>
|
||
<li>Configure the rulesets that the PMD OpenTool will use by selecting Tools->PMD->Configure PMD</li>
|
||
<li>Check all the files in a project by bringing up the context menu for
|
||
the project node and selecting PMD Check Project</li>
|
||
<li>Locate duplicate code by right clicking on a package and selection “Check with CPD”</li>
|
||
</ul>
|
||
|
||
<p>When running PMD, the results will be displayed in the MessageView under a tab called PMD Results. If you click on a
|
||
violation message within this view, you will be taken to the line in the source code where the violation was detected.</p>
|
||
|
||
<p>Things still to do:</p>
|
||
|
||
<ul>
|
||
<li>Enable selection of individual rules within a rule set (maybe)</li>
|
||
<li>Optional insertion of @todo comments at the point of a violation</li>
|
||
<li>Possibly provide configurable ability to limit the number of violations per rule per file</li>
|
||
</ul>
|
||
|
||
<h3 id="jcreator">JCreator</h3>
|
||
|
||
<ol>
|
||
<li>Open Configure > Options</li>
|
||
<li>Go to the Tools panel</li>
|
||
<li>Click New > Program</li>
|
||
<li>Browse for PMD’s pmd.bat</li>
|
||
<li>Put quotations around the path if it has spaces.</li>
|
||
<li>Set the initial directory to PMD’s \bin directory</li>
|
||
<li>Check capture output</li>
|
||
<li>Put ‘”$[PrjDir]” emacs’ followed by desired rulesets in the arguments</li>
|
||
</ol>
|
||
|
||
<p>To run PMD on a project, just pick pmd from the Tools menu.</p>
|
||
|
||
<h3 id="jdeveloper">JDeveloper</h3>
|
||
|
||
<p>To install the PMD plugin for JDeveloper:</p>
|
||
|
||
<ul>
|
||
<li>JDeveloper 10.1.2: Download the binary release and unzip it into your jdev/lib/ext directory</li>
|
||
<li>JDeveloper 10.1.3 upwards: Click “Help”, click “Check for Updates”
|
||
<ul>
|
||
<li>JDeveloper 10.1.3:
|
||
<ul>
|
||
<li>Press “Add” to add a new update center</li>
|
||
<li>Name: PMD Update Center</li>
|
||
<li>Location: <a href="http://pmd.sourceforge.net/center.xml">http://pmd.sourceforge.net/center.xml</a></li>
|
||
<li>Select Update Center: PMD Update Center</li>
|
||
</ul>
|
||
</li>
|
||
<li>JDeveloper 11 upwards: Select Update Center: Open Source and Partner Extensions</li>
|
||
<li>Press Next and select the actual PMD Plugin and install it</li>
|
||
</ul>
|
||
</li>
|
||
<li>Restart JDeveloper</li>
|
||
</ul>
|
||
|
||
<p>To run the PMD plugin for JDeveloper:</p>
|
||
|
||
<ul>
|
||
<li>Open the Tools-&Preferences menu</li>
|
||
<li>Click on the PMD option</li>
|
||
<li>Select a couple of rules to try</li>
|
||
<li>To run PMD, right click on either a file, folder, package, project or workspace and select PMD via
|
||
Toolbar Icon, Context Menu or File Menu</li>
|
||
<li>Any rule violations should show up in a LogWindow tab at the bottom of the screen</li>
|
||
</ul>
|
||
|
||
<h3 id="jedit">JEdit</h3>
|
||
|
||
<p>The way I use the JEdit plugin is:</p>
|
||
|
||
<ul>
|
||
<li>Dock the ErrorList by going to Utilities->Global Options->Docking and
|
||
putting ErrorList at the bottom of the screen</li>
|
||
<li>Open the File Browser if it isn’t already open</li>
|
||
<li>Double-click on a source directory</li>
|
||
<li>Select Plugins->PMD->Check directory recursively</li>
|
||
</ul>
|
||
|
||
<p>Note that you can select individual rules by going to Utilities->Global Options->Plugin Options->PMD.
|
||
Also, you can change the plugin to prompt you for a directory to check by going to that same menu and
|
||
selecting the “Ask for Directory” checkbox.</p>
|
||
|
||
<h3 id="netbeans">NetBeans</h3>
|
||
|
||
<p>The <a href="http://kenai.com/projects/sqe/">SQE</a> project includes PMD integration for NetBeans.</p>
|
||
|
||
<h3 id="textpad">TextPad</h3>
|
||
|
||
<p><strong>Assumptions</strong></p>
|
||
|
||
<ul>
|
||
<li>The Java Development Kit, version 1.4.2 (versions 1.4 and higher are acceptable) is properly installed
|
||
into your machine, and exists in <code class="language-plaintext highlighter-rouge">D:\java\jdk\_142\</code>. This means that <code class="language-plaintext highlighter-rouge">D:\java\jdk\_142\bin\java.exe</code> exists.</li>
|
||
<li>PMD version 5.0 exists in <code class="language-plaintext highlighter-rouge">D:\java\pmd-bin-\</code>.
|
||
This means that <code class="language-plaintext highlighter-rouge">D:\java\pmd-bin-\lib\pmd-.jar</code> (among other jar files
|
||
in the same directory) exist.</li>
|
||
</ul>
|
||
|
||
<p><strong>To integrate into TextPad</strong></p>
|
||
|
||
<ol>
|
||
<li>In the <strong>Configure</strong> menu, choose <strong>Preferences…</strong>. This opens the Preferences dialog</li>
|
||
<li>In the left pane of the Preferences dialog, choose the <strong>Tools</strong> branch by clicking on the <em>word</em> “Tools”.</li>
|
||
<li>On the far right of the dialog, click on the <strong>Add</strong> button, and then select <strong>Program…</strong> from the drop-down.
|
||
This opens the standard Windows Open File dialog.</li>
|
||
<li>Type <code class="language-plaintext highlighter-rouge">D:\java\jdk_142\bin\java.exe</code> and click the <strong>Open</strong> button. In the center pane of the Preferences dialog,
|
||
an item “Java” has now been added, and is currently selected.</li>
|
||
<li>Click the word Java, which makes the word editable. Select the entire word, and type “PMD directory”. Press Return.</li>
|
||
<li>Repeat steps three through five, but type “PMD file”, instead of “PMD directory”.</li>
|
||
<li>Click <strong>Apply</strong>.</li>
|
||
<li>Expand the <strong>Tools</strong> branch (if not already) by clicking on the ‘<code class="language-plaintext highlighter-rouge">+</code>’ directly to its left.</li>
|
||
<li>In the expanded list, select <strong>PMD directory</strong>. This changes the right side of this dialog to the “tool” form.</li>
|
||
<li>In the “tool” form, enter these parameters:
|
||
<ul>
|
||
<li><strong>Parameters:</strong> <code class="language-plaintext highlighter-rouge">-classpath D:\java\pmd-bin-\lib\pmd-.jar;D:\java\pmd-bin-\lib\asm-3.2.jar;D:\java\pmd-bin-\lib\jaxen-1.1.1.jar net.sourceforge.pmd.PMD -d <i><b>$FileDir</b></i> -f net.sourceforge.pmd.renderers.TextPadRenderer -R E:\directory\my_pmd_ruleset.xml -debug</code></li>
|
||
<li><strong>Initial Folder:</strong> <code class="language-plaintext highlighter-rouge">$FileDir</code></li>
|
||
<li><strong>Save all documents first:</strong> <code class="language-plaintext highlighter-rouge">Checked</code></li>
|
||
<li><strong>Capture output:</strong> <code class="language-plaintext highlighter-rouge">Checked</code></li>
|
||
<li><strong><em>All other checkboxes</em>:</strong> Unchecked</li>
|
||
<li><strong>Regular expression to match output:</strong> <code class="language-plaintext highlighter-rouge">^\([^(]+\)(\([0-9]+\),</code></li>
|
||
<li><strong>Registers/File:</strong> <code class="language-plaintext highlighter-rouge">1</code></li>
|
||
<li><strong>Registers/Line:</strong> <code class="language-plaintext highlighter-rouge">2</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>In the expanded list, select <strong>PMD file</strong>.</li>
|
||
<li>In the “tool” form, enter the same parameters as above, except replace ‘<code class="language-plaintext highlighter-rouge">$FileDir</code>’ with ‘<code class="language-plaintext highlighter-rouge">$File</code>’,
|
||
in the Parameters textbox.</li>
|
||
<li>To save your work (truly, given a quirk of TextPad), click on <strong>OK</strong>, which closes the Preferences dialog.
|
||
Restart TextPad and re-open the Preferences dialog.</li>
|
||
<li>Go back to both the “PMD directory” and “PMD file” Tools branches, and replace ‘<code class="language-plaintext highlighter-rouge">E:\directory\my_pmd_ruleset.xml</code>’
|
||
with the ruleset of your choice. For example, <code class="language-plaintext highlighter-rouge">basic</code>.</li>
|
||
<li>Go to the <strong>Keyboard</strong> branch in the left pane (above <strong>Tools</strong>), which changes the right side to
|
||
the “keyboard configuration” form.</li>
|
||
<li>In the <strong>Categories</strong> list box, select <strong>Tools</strong>.</li>
|
||
<li>In the <strong>Command</strong> list box, select <strong>PMD directory</strong>.</li>
|
||
<li>Put your cursor into the <strong>Press new shortcut key</strong>, and type your desired key command.
|
||
For example <code class="language-plaintext highlighter-rouge">Ctrl+Page Up</code></li>
|
||
<li>Click <strong>Assign</strong>.</li>
|
||
<li>In the <strong>Command</strong> list box, select <strong>PMD file</strong>.</li>
|
||
<li>Put your cursor into the <strong>Press new shortcut key</strong>, and type your desired key command.
|
||
For example <code class="language-plaintext highlighter-rouge">Ctrl+Page Down</code></li>
|
||
<li>Click <strong>Assign</strong>.</li>
|
||
<li>Save your work again: Click on <strong>OK</strong>, which closes the Preferences dialog, and then restart TextPad.</li>
|
||
</ol>
|
||
|
||
<p><strong>To run PMD against a single Java file</strong></p>
|
||
|
||
<ol>
|
||
<li>In TextPad, open any Java file.</li>
|
||
<li>Click <code class="language-plaintext highlighter-rouge">Ctrl+Page Down</code>. This opens an empty, read-only text document (titled “Command Results”).
|
||
When PMD completes its analysis, this document will be populated with a listing of violated rules
|
||
(or “Command completed successfully” indicating no violations).</li>
|
||
<li>Double click any line to go to it.</li>
|
||
</ol>
|
||
|
||
<p><strong>To run PMD against a directory of Java files</strong></p>
|
||
|
||
<ol>
|
||
<li>In TextPad, open <em>any</em> file in the <em>root</em> directory you wish to analyze. Unfortunately, you’ll need to
|
||
create a dummy file, if no file exists there.</li>
|
||
<li>Click <code class="language-plaintext highlighter-rouge">Ctrl+Page Up</code>. This opens an empty, read-only text document (titled “Command Results”).
|
||
When PMD completes its analysis, this document will be populated with a listing of violated rules
|
||
(or “Command completed successfully” indicating no violations).</li>
|
||
<li>Double click any line to go to it.</li>
|
||
</ol>
|
||
|
||
<p><em>Because directory analysis may take a while, you may choose to cancel this operation. Do so by closing
|
||
the (blank Command Results) document, and then confirming that, “yes, I do really want to exit the tool”.</em></p>
|
||
|
||
<h3 id="weblogic-workshop-81x">WebLogic Workshop 8.1.x</h3>
|
||
|
||
<p>Please see <a href="http://pmdwlw.sf.net/">the WebLogic Workshop plugin project home page</a> for more information.</p>
|
||
|
||
|
||
<div class="tags">
|
||
|
||
<b>Tags: </b>
|
||
|
||
|
||
|
||
<a href="tag_userdocs.html" class="btn btn-outline-secondary navbar-btn cursorNorm" role="button">userdocs</a>
|
||
|
||
|
||
|
||
<a href="tag_tools.html" class="btn btn-outline-secondary navbar-btn cursorNorm" role="button">tools</a>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
|
||
<footer>
|
||
|
||
<hr />
|
||
<div>
|
||
This documentation is written in markdown. <br />
|
||
If there is something missing or can be improved, edit this page on
|
||
github and create a PR:
|
||
<a
|
||
target="_blank"
|
||
href="https://github.com/pmd/pmd/blob/main/docs/pages/pmd/userdocs/tools/tools.md"
|
||
role="button"
|
||
><i class="fab fa-github fa-lg"></i> Edit on GitHub</a
|
||
>
|
||
</div>
|
||
|
||
<hr />
|
||
<div class="row">
|
||
<div class="col-lg-12 footer">
|
||
©2024 PMD Open Source Project. All rights
|
||
reserved. <br />
|
||
Site last generated: Nov 21, 2024 <br />
|
||
<p>
|
||
<img src="images/logo/pmd-logo-70px.png" alt="PMD
|
||
logo"/>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
</div>
|
||
|
||
<!-- /.row -->
|
||
</div>
|
||
<!-- /.container -->
|
||
</div>
|
||
|
||
|
||
<!-- Sticky TOC column -->
|
||
<div class="toc-col">
|
||
<div id="toc"></div>
|
||
</div>
|
||
|
||
<!-- /.toc-container-wrapper -->
|
||
</div>
|
||
</div>
|
||
|
||
<script type="application/javascript" src="assets/jquery-3.5.1/jquery-3.5.1.min.js"></script>
|
||
<script type="application/javascript" src="assets/anchorjs-4.2.2/anchor.min.js"></script>
|
||
<script type="application/javascript" src="assets/navgoco-0.2.1/src/jquery.navgoco.min.js"></script>
|
||
<script type="application/javascript" src="assets/bootstrap-4.5.2-dist/js/bootstrap.bundle.min.js"></script>
|
||
<script type="application/javascript" src="assets/Simple-Jekyll-Search-1.0.8/dest/jekyll-search.js"></script>
|
||
<script type="application/javascript" src="assets/jekyll-table-of-contents/toc.js"></script>
|
||
<script type="application/javascript" src="js/tabstate.js"></script>
|
||
<script type="application/javascript" src="js/customscripts.js"></script>
|
||
|
||
|
||
|
||
</body>
|
||
</html>
|