Skip to content

Commit

Permalink
Merge branch 'master' into pr/4969
Browse files Browse the repository at this point in the history
  • Loading branch information
oowekyala committed May 7, 2024
2 parents 722f25b + ef19659 commit e433127
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 35 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,26 @@
[![Join the chat](https://img.shields.io/gitter/room/pmd/pmd)](https://app.gitter.im/#/room/#pmd_pmd:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://github.com/pmd/pmd/workflows/build/badge.svg?branch=master)](https://github.com/pmd/pmd/actions)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.pmd/pmd)
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central#net.sourceforge.pmd:pmd)
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central/tree/master/content/net/sourceforge/pmd#readme)
[![Coverage Status](https://coveralls.io/repos/github/pmd/pmd/badge.svg)](https://coveralls.io/github/pmd/pmd)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://www.codacy.com/gh/pmd/pmd/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pmd/pmd&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ea550046a02344ec850553476c4aa2ca)](https://app.codacy.com/organizations/gh/pmd/dashboard)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
[![Documentation (latest)](https://img.shields.io/badge/docs-latest-green)](https://docs.pmd-code.org/latest/)

**PMD** is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules.
It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations.
Rules can be written in Java or using a XPath query.
**PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables,
empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and
Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be
extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees
(AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query.

It supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Modelica, PLSQL, Apache Velocity, HTML, XML and XSL.
Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL.
Scala is supported, but there are currently no Scala rules available.

Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in
C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Kotlin, Lua, Matlab, Modelica,
Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL,
Apache Velocity, and XML.

In the future we hope to add support for data/control flow analysis and automatic (quick) fixes where
it makes sense.
Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin,
Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and
Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.

## 🚀 Installation and Usage

Expand Down
20 changes: 15 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ additional_js:
<!-- You can link to an individual panel, the id is determined from the title of the panel -->
<!-- See custom/shuffle_panel.html for the details -->

**PMD** is a static source code analyzer. It finds common programming flaws like
unused variables, empty catch blocks, unnecessary object creation, and
so forth. It's mainly concerned with **Java and Apex**, but **supports 16 other
languages**.
**PMD** is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables,
empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with **Java and
Apex**, but **supports 16 other languages**. It comes with **400+ built-in rules**. It can be
extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees
(AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query.

Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL.
Scala is supported, but there are currently no Scala rules available.

Additionally, it includes **CPD**, the copy-paste-detector. CPD finds duplicated code in
Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin,
Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and
Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.

PMD features many **built-in checks** (in PMD lingo, *rules*), which are documented
for each language in our [Rule references](#shuffle-panel-rule-references). We
Expand All @@ -43,7 +53,7 @@ things, PMD can be run:
* As a [bld operation](pmd_userdocs_tools_bld.html)
* From [command-line](pmd_userdocs_installation.html#running-pmd-via-command-line)

**CPD**, the **copy-paste detector**, is also distributed with PMD. You can also use it
**CPD**, the **copy-paste detector**, is also distributed with PMD. You can use it
in a variety of ways, which are [documented here](pmd_userdocs_cpd.html).

## 💾 Download
Expand Down
44 changes: 28 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
<name>PMD</name>

<description>
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks,
unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules.
It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations.
Rules can be written in Java or using a XPath query.
PMD is an extensible multilanguage static code analyzer. It finds common programming flaws like unused variables,
empty catch blocks, unnecessary object creation, and so forth. It's mainly concerned with Java and
Apex, but supports 16 other languages. It comes with 400+ built-in rules. It can be
extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees
(AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query.

It supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, HTML, XML and XSL.
Currently, PMD supports Java, JavaScript, Salesforce.com Apex and Visualforce,
Kotlin, Swift, Modelica, PLSQL, Apache Velocity, JSP, WSDL, Maven POM, HTML, XML and XSL.
Scala is supported, but there are currently no Scala rules available.

Additionally, it includes CPD, the copy-paste-detector. CPD finds duplicated code in
Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin, Lua, Matlab, Modelica,
Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and Visualforce, Scala, Swift, T-SQL, Typescript and XML.
Coco, C/C++, C#, Dart, Fortran, Gherkin, Go, Groovy, HTML, Java, JavaScript, JSP, Julia, Kotlin,
Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex and
Visualforce, Scala, Swift, T-SQL, Typescript, Apache Velocity, WSDL, XML and XSL.
</description>

<url>https://pmd.github.io/</url>
Expand Down Expand Up @@ -504,9 +506,22 @@
<id>pmd-main</id>
<phase>verify</phase>
<goals>
<goal>pmd</goal>
<goal>check</goal>
<goal>cpd</goal>
<goal>cpd-check</goal>
</goals>
<configuration>
<skip>${pmd.skip}</skip>
<minimumTokens>100</minimumTokens>
<rulesets>
<ruleset>/net/sourceforge/pmd/pmd-dogfood-config.xml</ruleset>
</rulesets>
<excludeRoots>
<excludeRoot>target/generated-sources/javacc</excludeRoot>
<excludeRoot>target/generated-sources/antlr4</excludeRoot>
</excludeRoots>
</configuration>
</execution>
<execution>
<id>pmd-test</id>
Expand All @@ -516,6 +531,7 @@
<goal>check</goal>
</goals>
<configuration>
<skip>${pmd.skip}</skip>
<targetDirectory>${project.build.directory}/pmdTest/</targetDirectory>
<includeTests>true</includeTests>
<rulesets>
Expand All @@ -526,19 +542,15 @@
</executions>
<configuration>
<linkXRef>false</linkXRef>
<minimumTokens>100</minimumTokens>
<targetJdk>1.${java.version}</targetJdk>
<rulesets>
<ruleset>/net/sourceforge/pmd/pmd-dogfood-config.xml</ruleset>
</rulesets>
<excludeRoots>
<excludeRoot>target/generated-sources/javacc</excludeRoot>
<excludeRoot>target/generated-sources/antlr4</excludeRoot>
</excludeRoots>
<skipPmdError>false</skipPmdError>
<failurePriority>2</failurePriority>
<failOnViolation>true</failOnViolation>
<printFailingErrors>true</printFailingErrors>
<!-- Skip the default pmd executions, which is triggered by pmd:check and avoid
unnecessary pmd analysis of the main code.
We use executions pmd-main and pmd-test instead and explicitly run pmd:pmd. -->
<skip>true</skip>
</configuration>
<dependencies>
<!-- Note: we can't use a property for the version here due to https://issues.apache.org/jira/browse/MRELEASE-932 -->
Expand Down

0 comments on commit e433127

Please sign in to comment.