Repository navigation
chore(pmd): update PMD rulesets and add Salesforce Code Analyzer - #274
Merged
Merged
Conversation
dschach
force-pushed
the
chore/update-pmd
branch
from
October 9, 2026 08:11
a340ca1 to
2873614
Compare
…ject Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #274 +/- ##
==========================================
+ Coverage 98.48% 99.18% +0.69%
==========================================
Files 1 2 +1
Lines 132 244 +112
==========================================
+ Hits 130 242 +112
Misses 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request updates the PMD setup for the project. It adds Salesforce Code Analyzer. It replaces the quickstart ruleset with a full ruleset of all standard Apex rules.
Changes
PMD rulesets
pmd/apexQuickStart.xmltopmd/apexStandardRules.xml.ExcessiveClassLength.pmd/allApexPMDCategories.xml. It references each standard Apex category and excludes the deprecated rules.Salesforce Code Analyzer
code-analyzer.ymlwith the rule overrides.codeanalyzer:configscript topackage.json..vscode/settings.json.Workflows
pmd/apexStandardRules.xmlinci.ymland inpmd.yml.Apex code
LIMIT 2000to theRecordTypequery inrecordTypesIdMap.@SuppressWarningsannotations for the new PMD rules.@testVisibleto@TestVisible.UnpackagedRecordTypesTestand make the classwithout sharing.Other files
.eslintignore.README.md.Review notes
main. The merge conflict inpackage.jsonis resolved.Testing
pmd check --dir force-app --rulesets pmd/apexStandardRules.xml.BEGIN_NESTED_COMMIT
chore(pmd): replace apexQuickStart.xml with apexStandardRules.xml
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
chore(pmd): add allApexPMDCategories.xml ruleset
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
build(code-analyzer): add Salesforce Code Analyzer configuration
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
ci(pmd): use apexStandardRules.xml in the PMD workflows
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
perf(RecordTypes): add LIMIT 2000 to the RecordType query
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
style(RecordTypes): add PMD suppressions and fix the TestVisible case
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
test(unpackaged): format asserts and set the test class to without sharing
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
docs(readme): add a changelog entry for Code Analyzer
END_NESTED_COMMIT