We stand with Ukraine to help keep people safe. Join us
PMD
PMD
0.0
0.0
PMD free download for Mac

PMD

Version 6.49.0

Cross-language static code analyzer.

Free
Absolutely Free

PMD overview

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 Java, JavaScript, Salesforce.com Apex and Visualforce, PLSQL, Apache Velocity, XML, XSL.

Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in Java, C, C++, C#, Groovy, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Scala, Objective C, Matlab, Python, Go, Swift and Salesforce.com Apex and Visualforce.

What’s new in version 6.49.0

Updated on Sep 01 2022

New and noteworthy:
Java 19 Support:
  • This release of PMD brings support for Java 19. There are no new standard language features.
  • PMD supports JEP 427: Pattern Matching for switch (Third Preview) and
  • JEP 405: Record Patterns (Preview) as preview language features.
  • In order to analyze a project with PMD that uses these language features,
  • you'll need to enable it via the environment variable PMD_JAVA_OPTS and select the new language
version 19-preview:
  • export PMD_JAVA_OPTS=--enable-preview
  • ./run.sh pmd -language java -version 19-preview ...
  • Note: Support for Java 17 preview language features have been removed. The version "17-preview" is no longer available.
Gherkin support:
  • Thanks to the contribution from Anne Brouwers PMD now has CPD support
  • for the Gherkin language. It is used to defined test cases for the
  • Cucumber testing tool for behavior-driven development.
Being based on a proper Antlr grammar, CPD can:
  • ignore comments
  • honor comment-based suppressions
Fixed Issues:
apex:
  • #4056: [apex] ApexSOQLInjection: Add support count query
core:
  • #3796: [core] CPD should also provide a --debug flag
  • #4021: [core] CPD: Add total number of tokens to XML reports
  • #4031: [core] If report is written to stdout, stdout should not be closed
  • #4051: [doc] Additional rulesets are not listed in documentation
  • #4053: [core] Allow building PMD under Java 18+
java:
  • #4015: [java] Support JDK 19
java-bestpractices:
  • #3455: [java] WhileLoopWithLiteralBoolean - false negative with complex expressions
java-design:
  • #3729: [java] TooManyMethods ignores "real" methods which are named like getters or setters
  • #3949: [java] FinalFieldCouldBeStatic - false negative with unnecessary parenthesis
java-performance:
  • #3625: [java] AddEmptyString - false negative with empty var
lua:
  • #4061: [lua] Fix several related Lua parsing issues found when using CPD
test:
  • #3302: [test] Improve xml test schema
  • #3758: [test] Move pmd-test to java 8
  • #3976: [test] Extract xml schema module
API Changes:
CPD CLI:
  • CPD has a new CLI option --debug. This option has the same behavior as in PMD. It enables more verbose
  • logging output.
Rule Test Framework:
  • The module "pmd-test", which contains support classes to write rule tests, now requires Java 8. If you depend on
  • this module for testing your own custom rules, you'll need to make sure to use at least Java 8.
  • The new module "pmd-test-schema" contains now the XSD schema and the code to parse the rule test XML files. The
  • schema has been extracted in order to easily share it with other tools like the Rule Designer or IDE plugins.
Test schema changes:
  • The attribute isRegressionTest of test-code is deprecated. The new
  • attribute disabled should be used instead for defining whether a rule test should be skipped or not.
  • The attributes reinitializeRule and useAuxClasspath of test-code are deprecated and assumed true.
  • They will not be replaced.
  • The new attribute focused of test-code allows disabling all tests except the focused one temporarily.
More information about the rule test framework can be found in the documentation:
  • Testing your rules
Deprecated API:
  • The experimental Java AST class ASTGuardedPattern has been deprecated and
  • will be removed. It was introduced for Java 17 and Java 18 Preview as part of pattern matching for switch,
  • but it is no longer supported with Java 19 Preview.
  • The interface CPDRenderer is deprecated. For custom CPD renderers
  • the new interface CPDReportRenderer should be used.
  • The class TestDescriptor is deprecated, replaced with RuleTestDescriptor.
  • Many methods of RuleTst have been deprecated as internal API.
Experimental APIs:
  • To support the Java preview language features "Pattern Matching for Switch" and "Record Patterns", the following
AST nodes have been introduced as experimental:
  • ASTSwitchGuard
  • ASTRecordPattern
  • ASTComponentPatternList
Internal API:
  • Those APIs are not intended to be used by clients, and will be hidden or removed with PMD 7.0.0.
  • You can identify them with the @InternalApi annotation. You'll also get a deprecation warning.
  • CPDConfiguration#setRenderer
  • CPDConfiguration#setCPDRenderer
  • CPDConfiguration#getRenderer
  • CPDConfiguration#getCPDRenderer
  • CPDConfiguration#getRendererFromString
  • CPDConfiguration#getCPDRendererFromString
  • CPDRendererAdapter
Fixed Issues
  • apex: [apex] ApexAssertionsShouldIncludeMessage and ApexUnitTestClassShouldHaveAsserts: support new Assert class (introduced with Apex v56.0)
  • core: [core] FileCollector.addFile ignores language parameter
  • java-codestyle: [java] UnnecessaryImport false positive for on-demand imports of nested classes

Full list of changes available here

Information

License

Free

Size

43.3 MB

Developer’s website

https://pmd.github.io/

Downloads

321

App requirements

  • Intel 64
  • Mac OS X 10.6.8 or later
  • Java JRE 1.7 or later
Try our new feature and write a detailed review about PMD. All reviews will be posted soon.
Write your thoughts in our old-fashioned comment
MacUpdate Comment Policy. We strongly recommend leaving comments, however comments with abusive words, bullying, personal attacks of any type will be moderated.
0.0
(0 Reviews of )
There are no reviews yet
Help the community
There are no reviews yet, be the first to leave one
Free
Absolutely Free
How would you rate PMD?
Similar apps
Wireshark
Network protocol analyzer.
Is this app is similar to Wireshark? Vote to improve the quality of this list.
Vote results
1
Upvotes
1
Total score
0
Downvotes
Visual Studio Code
Cross-platform code editor and debugger for web apps.
Is this app is similar to Visual Studio Code? Vote to improve the quality of this list.
Vote results
1
Upvotes
1
Total score
0
Downvotes
A1 Website Analyzer
Website analysis and auditing.
Is this app is similar to A1 Website Analyzer? Vote to improve the quality of this list.
Vote results
1
Upvotes
1
Total score
0
Downvotes