[doc] Update release notes - Apex: Replaced Jorje with fully open source front-end
Fixes #3766
This commit is contained in:
@ -89,6 +89,33 @@ This PMD release ships a new version of the pmd-designer.
|
||||
For the changes, see
|
||||
* [PMD Designer Changelog (7.0.0)](https://github.com/pmd/pmd-designer/releases/tag/7.0.0).
|
||||
|
||||
##### Apex Support: Replaced Jorje with fully open source front-end
|
||||
|
||||
When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source
|
||||
and generate an AST. This library is however a binary-blob provided as part of the
|
||||
[Salesforce Extensions for VS Code](https://github.com/forcedotcom/salesforcedx-vscode), and it is closed-source.
|
||||
|
||||
This causes problems, if binary blobs are not allowed by e.g. a company-wide policy. In that case, the Jorje
|
||||
library prevented that PMD Apex could be used at all.
|
||||
|
||||
Also having access to the source code, enhancements and modifications are easier to do.
|
||||
|
||||
Under the hood, we use two open source libraries instead:
|
||||
|
||||
* [apex-parser](https://github.com/nawforce/apex-parser) by [Kevin Jones](https://github.com/nawforce) (@nawforce)
|
||||
This project provides the grammar for a ANTLR based parser.
|
||||
* [Summit-AST](https://github.com/google/summit-ast) by [Google](https://github.com/google) (@google)
|
||||
This project translates the ANTLR parse tree into an AST, that is similar to the AST Jorje provided.
|
||||
Note: This is not an official Google product.
|
||||
|
||||
Although the parsers is completely switched, there are only little known changes to the AST.
|
||||
These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast).
|
||||
|
||||
See [#3766](https://github.com/pmd/pmd/issues/3766) for details.
|
||||
|
||||
Contributors: [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google),
|
||||
[Edward Klimoshenko](https://github.com/eklimo) (@eklimo)
|
||||
|
||||
#### Rule Changes
|
||||
|
||||
**New Rules**
|
||||
@ -199,6 +226,8 @@ The rules have been moved into categories with PMD 6.
|
||||
* [#4741](https://github.com/pmd/pmd/pull/4741): Add pmd-compat6 module for maven-pmd-plugin
|
||||
* [#4749](https://github.com/pmd/pmd/pull/4749): Fixes NoSuchMethodError on processing errors in pmd-compat6
|
||||
* [#4796](https://github.com/pmd/pmd/pull/4796): Remove deprecated and release rulesets
|
||||
* apex
|
||||
* [#3766](https://github.com/pmd/pmd/issues/3766): \[apex] Replace Jorje with fully open source front-end
|
||||
* apex-performance
|
||||
* [#4675](https://github.com/pmd/pmd/issues/4675): \[apex] New Rule: OperationWithHighCostInLoop
|
||||
* groovy
|
||||
@ -317,6 +346,15 @@ The following previously deprecated classes have been removed:
|
||||
has been removed as well. If you don't want colors, use `text` renderer ({%jdoc core::renderers.TextRenderer %}).
|
||||
|
||||
#### External Contributions
|
||||
* [#4093](https://github.com/pmd/pmd/pull/4093): \[apex] Summit-AST Apex module - Part 1 - [Edward Klimoshenko](https://github.com/eklimo) (@eklimo)
|
||||
* [#4151](https://github.com/pmd/pmd/pull/4151): \[apex] Summit-AST Apex module - Part 2 - expression nodes - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4171](https://github.com/pmd/pmd/pull/4171): \[apex] Summit-AST Apex module - Part 3 - initializers - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4206](https://github.com/pmd/pmd/pull/4206): \[apex] Summit-AST Apex module - Part 4 - statements - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4219](https://github.com/pmd/pmd/pull/4219): \[apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc. - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4242](https://github.com/pmd/pmd/pull/4242): \[apex] Merge 6.52 into experimental-apex-parser - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4251](https://github.com/pmd/pmd/pull/4251): \[apex] Summit-AST Apex module - Part 6 Passing testsuite - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4448](https://github.com/pmd/pmd/pull/4448): \[apex] Bump summit-ast to new release 2.1.0 (and remove workaround) - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4479](https://github.com/pmd/pmd/pull/4479): \[apex] Merge main (7.x) branch into experimental-apex-parser and fix tests - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4640](https://github.com/pmd/pmd/pull/4640): \[cli] Launch script fails if run via "bash pmd" - [Shai Bennathan](https://github.com/shai-bennathan) (@shai-bennathan)
|
||||
* [#4673](https://github.com/pmd/pmd/pull/4673): \[javascript] CPD: Added support for decorator notation - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
|
||||
* [#4677](https://github.com/pmd/pmd/pull/4677): \[apex] Add new rule: OperationWithHighCostInLoop - [Thomas Prouvot](https://github.com/tprouvot) (@tprouvot)
|
||||
@ -477,17 +515,39 @@ Note: Support for Java 19 preview language features have been removed. The versi
|
||||
literals were ignored. The new option additional ignores identifiers as well in sequences.
|
||||
* See [PR #4470](https://github.com/pmd/pmd/pull/4470) for details.
|
||||
|
||||
#### Changed: Apex Jorje Updated
|
||||
|
||||
With the new version of Apex Jorje, the new language constructs like User Mode Database Operations
|
||||
can be parsed now. PMD should now be able to parse Apex code up to version 59.0 (Winter '23).
|
||||
|
||||
#### Changed: Groovy Support (CPD)
|
||||
|
||||
* We now support parsing all Groovy features from Groovy 3 and 4.
|
||||
* We now support [suppression](pmd_userdocs_cpd.html#suppression) through `CPD-ON`/`CPD-OFF` comment pairs.
|
||||
* See [PR #4726](https://github.com/pmd/pmd/pull/4726) for details.
|
||||
|
||||
#### Changed: Apex Support: Replaced Jorje with fully open source front-end
|
||||
|
||||
When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source
|
||||
and generate an AST. This library is however a binary-blob provided as part of the
|
||||
[Salesforce Extensions for VS Code](https://github.com/forcedotcom/salesforcedx-vscode), and it is closed-source.
|
||||
|
||||
This causes problems, if binary blobs are not allowed by e.g. a company-wide policy. In that case, the Jorje
|
||||
library prevented that PMD Apex could be used at all.
|
||||
|
||||
Also having access to the source code, enhancements and modifications are easier to do.
|
||||
|
||||
Under the hood, we use two open source libraries instead:
|
||||
|
||||
* [apex-parser](https://github.com/nawforce/apex-parser) by [Kevin Jones](https://github.com/nawforce) (@nawforce)
|
||||
This project provides the grammar for a ANTLR based parser.
|
||||
* [Summit-AST](https://github.com/google/summit-ast) by [Google](https://github.com/google) (@google)
|
||||
This project translates the ANTLR parse tree into an AST, that is similar to the AST Jorje provided.
|
||||
Note: This is not an official Google product.
|
||||
|
||||
Although the parsers is completely switched, there are only little known changes to the AST.
|
||||
These are documented in the [Migration Guide for PMD 7: Apex AST]({{ baseurl }}pmd_userdocs_migrating_to_pmd7.html#apex-ast).
|
||||
|
||||
See [#3766](https://github.com/pmd/pmd/issues/3766) for details.
|
||||
|
||||
Contributors: [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google),
|
||||
[Edward Klimoshenko](https://github.com/eklimo) (@eklimo)
|
||||
|
||||
#### Changed: Rule properties
|
||||
|
||||
* The old deprecated classes like `IntProperty` and `StringProperty` have been removed. Please use
|
||||
@ -781,6 +841,7 @@ Language specific fixes:
|
||||
* [#1648](https://github.com/pmd/pmd/issues/1648): \[apex,vf] Remove CodeClimate dependency
|
||||
* [#1750](https://github.com/pmd/pmd/pull/1750): \[apex] Remove apex statistical rules
|
||||
* [#2836](https://github.com/pmd/pmd/pull/2836): \[apex] Remove Apex ProjectMirror
|
||||
* [#3766](https://github.com/pmd/pmd/issues/3766): \[apex] Replace Jorje with fully open source front-end
|
||||
* [#3973](https://github.com/pmd/pmd/issues/3973): \[apex] Update parser to support new 'as user' keywords (User Mode for Database Operations)
|
||||
* [#4427](https://github.com/pmd/pmd/issues/4427): \[apex] ApexBadCrypto test failing to detect inline code
|
||||
* [#4453](https://github.com/pmd/pmd/issues/4453): \[apex] \[7.0-rc1] Exception while initializing Apexlink (Index 34812 out of bounds for length 34812)
|
||||
@ -992,6 +1053,13 @@ Language specific fixes:
|
||||
* [#1882](https://github.com/pmd/pmd/pull/1882): \[swift] UnavailableFunction Swift rule - [Tomás de Lucca](https://github.com/tomidelucca) (@tomidelucca)
|
||||
* [#2830](https://github.com/pmd/pmd/pull/2830): \[apex] Apexlink POC - [Kevin Jones](https://github.com/nawforce) (@nawforce)
|
||||
* [#3866](https://github.com/pmd/pmd/pull/3866): \[core] Add CLI Progress Bar - [@JerritEic](https://github.com/JerritEic) (@JerritEic)
|
||||
* [#4093](https://github.com/pmd/pmd/pull/4093): \[apex] Summit-AST Apex module - Part 1 - [Edward Klimoshenko](https://github.com/eklimo) (@eklimo)
|
||||
* [#4151](https://github.com/pmd/pmd/pull/4151): \[apex] Summit-AST Apex module - Part 2 - expression nodes - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4171](https://github.com/pmd/pmd/pull/4171): \[apex] Summit-AST Apex module - Part 3 - initializers - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4206](https://github.com/pmd/pmd/pull/4206): \[apex] Summit-AST Apex module - Part 4 - statements - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4219](https://github.com/pmd/pmd/pull/4219): \[apex] Summit-AST Apex module - Part 5 - annotations, triggers, misc. - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4242](https://github.com/pmd/pmd/pull/4242): \[apex] Merge 6.52 into experimental-apex-parser - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4251](https://github.com/pmd/pmd/pull/4251): \[apex] Summit-AST Apex module - Part 6 Passing testsuite - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4402](https://github.com/pmd/pmd/pull/4402): \[javascript] CPD: add support for Typescript using antlr4 grammar - [Paul Guyot](https://github.com/pguyot) (@pguyot)
|
||||
* [#4403](https://github.com/pmd/pmd/pull/4403): \[julia] CPD: Add support for Julia code duplication - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
|
||||
* [#4412](https://github.com/pmd/pmd/pull/4412): \[doc] Added new error msg to ConstantsInInterface - [David Ljunggren](https://github.com/dague1) (@dague1)
|
||||
@ -999,10 +1067,12 @@ Language specific fixes:
|
||||
* [#4428](https://github.com/pmd/pmd/pull/4428): \[apex] ApexBadCrypto bug fix for #4427 - inline detection of hard coded values - [Steven Stearns](https://github.com/sfdcsteve) (@sfdcsteve)
|
||||
* [#4431](https://github.com/pmd/pmd/pull/4431): \[coco] CPD: Coco support for code duplication detection - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
|
||||
* [#4444](https://github.com/pmd/pmd/pull/4444): \[java] CommentDefaultAccessModifier - ignore org.junit.jupiter.api.extension.RegisterExtension by default - [Nirvik Patel](https://github.com/nirvikpatel) (@nirvikpatel)
|
||||
* [#4448](https://github.com/pmd/pmd/pull/4448): \[apex] Bump summit-ast to new release 2.1.0 (and remove workaround) - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4450](https://github.com/pmd/pmd/pull/4450): \[java] Fix #4449 AvoidAccessibilityAlteration: Correctly handle Lambda expressions in PrivilegedAction scenarios - [Seren](https://github.com/mohui1999) (@mohui1999)
|
||||
* [#4452](https://github.com/pmd/pmd/pull/4452): \[doc] Update PMD_APEX_ROOT_DIRECTORY documentation reference - [nwcm](https://github.com/nwcm) (@nwcm)
|
||||
* [#4470](https://github.com/pmd/pmd/pull/4470): \[cpp] CPD: Added strings as literal and ignore identifiers in sequences - [Wener](https://github.com/wener-tiobe) (@wener-tiobe)
|
||||
* [#4474](https://github.com/pmd/pmd/pull/4474): \[java] ImmutableField: False positive with lombok (fixes #4254) - [Pim van der Loos](https://github.com/PimvanderLoos) (@PimvanderLoos)
|
||||
* [#4479](https://github.com/pmd/pmd/pull/4479): \[apex] Merge main (7.x) branch into experimental-apex-parser and fix tests - [Aaron Hurst](https://github.com/aaronhurst-google) (@aaronhurst-google)
|
||||
* [#4488](https://github.com/pmd/pmd/pull/4488): \[java] Fix #4477: A false-positive about SignatureDeclareThrowsException - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
|
||||
* [#4494](https://github.com/pmd/pmd/pull/4494): \[java] Fix #4487: A false-positive about UnnecessaryConstructor and @<!-- -->Inject and @<!-- -->Autowired - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
|
||||
* [#4495](https://github.com/pmd/pmd/pull/4495): \[java] Fix #4493: false-positive about MissingStaticMethodInNonInstantiatableClass and @<!-- -->Inject - [AnnaDev](https://github.com/LynnBroe) (@LynnBroe)
|
||||
|
Reference in New Issue
Block a user