Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
gson = "2.11.0"
hamcrest = "2.2"
junit-jupiter = "5.10.2"
pmd = "7.7.0" # !!! IMPORTANT !!! KEEP THIS IN SYNC WITH PMD_VERSION INSIDE OF: src/constants.ts
pmd = "7.8.0" # !!! IMPORTANT !!! KEEP THIS IN SYNC WITH PMD_VERSION INSIDE OF: src/constants.ts
slf4j-nop = "2.0.13" # For now, we throw slf4j logs away (using this no-op module). We might use an actual logger in the future.

[libraries]
Expand Down
2 changes: 1 addition & 1 deletion packages/code-analyzer-pmd-engine/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// !!! IMPORTANT !!! KEEP THIS IN SYNC WITH gradle/libs.versions.toml
export const PMD_VERSION: string = '7.7.0';
export const PMD_VERSION: string = '7.8.0';

export const PMD_ENGINE_NAME: string = "pmd";
export const CPD_ENGINE_NAME: string = "cpd";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,19 @@
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_codestyle.html#propertynamingconventions"
]
},
{
"name": "QueueableWithoutFinalizer",
"severityLevel": 4,
"tags": [
"Recommended",
"BestPractices",
"apexLanguage"
],
"description": "Detects when the Queueable interface is used but a Finalizer is not attached. It is best practice to call the `System.attachFinalizer(Finalizer f)` method within the `execute` method of a class which implements the `Queueable` interface. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail.",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_bestpractices.html#queueablewithoutfinalizer"
]
},
{
"name": "ScopeForInVariable",
"severityLevel": 2,
Expand Down Expand Up @@ -1047,7 +1060,7 @@
"Design",
"apexLanguage"
],
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well. ApexLink is used to make this possible and this needs additional configuration. The environment variable `PMD_APEX_ROOT_DIRECTORY` needs to be set prior to executing PMD. With this variable the root directory of the Salesforce metadata,... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well, as long as the class itself is not entirely unused. A class is considered used, if it contains at least one other method/variable declaration that is used, as shown in the test project file Foo.cls. ApexLink is used to make this possible and... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,19 @@
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_codestyle.html#propertynamingconventions"
]
},
{
"name": "QueueableWithoutFinalizer",
"severityLevel": 4,
"tags": [
"Recommended",
"BestPractices",
"apexLanguage"
],
"description": "Detects when the Queueable interface is used but a Finalizer is not attached. It is best practice to call the `System.attachFinalizer(Finalizer f)` method within the `execute` method of a class which implements the `Queueable` interface. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail.",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_bestpractices.html#queueablewithoutfinalizer"
]
},
{
"name": "StdCyclomaticComplexity",
"severityLevel": 3,
Expand Down Expand Up @@ -787,7 +800,7 @@
"Design",
"apexLanguage"
],
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well. ApexLink is used to make this possible and this needs additional configuration. The environment variable `PMD_APEX_ROOT_DIRECTORY` needs to be set prior to executing PMD. With this variable the root directory of the Salesforce metadata,... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well, as long as the class itself is not entirely unused. A class is considered used, if it contains at least one other method/variable declaration that is used, as shown in the test project file Foo.cls. ApexLink is used to make this possible and... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,19 @@
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_codestyle.html#propertynamingconventions"
]
},
{
"name": "QueueableWithoutFinalizer",
"severityLevel": 4,
"tags": [
"Recommended",
"BestPractices",
"apexLanguage"
],
"description": "Detects when the Queueable interface is used but a Finalizer is not attached. It is best practice to call the `System.attachFinalizer(Finalizer f)` method within the `execute` method of a class which implements the `Queueable` interface. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail.",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_bestpractices.html#queueablewithoutfinalizer"
]
},
{
"name": "StdCyclomaticComplexity",
"severityLevel": 3,
Expand Down Expand Up @@ -787,7 +800,7 @@
"Design",
"apexLanguage"
],
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well. ApexLink is used to make this possible and this needs additional configuration. The environment variable `PMD_APEX_ROOT_DIRECTORY` needs to be set prior to executing PMD. With this variable the root directory of the Salesforce metadata,... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"description": "Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well, as long as the class itself is not entirely unused. A class is considered used, if it contains at least one other method/variable declaration that is used, as shown in the test project file Foo.cls. ApexLink is used to make this possible and... Learn more: https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod",
"resourceUrls": [
"https://docs.pmd-code.org/pmd-doc-{{PMD_VERSION}}/pmd_rules_apex_design.html#unusedmethod"
]
Expand Down
Loading