diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 853db0c..c18c030 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,4 +53,4 @@ jobs: ~/pmd/bin/pmd --version # Run PMD scan - name: 'Run PMD scan' - run: ~/pmd/bin/pmd check --dir force-app --rulesets pmd/deployRules.xml --format text --cache .pmdCache --no-progress --minimum-priority "Medium Low" + run: ~/pmd/bin/pmd check --dir force-app --rulesets pmd/apexQuickStart.xml --format text --no-cache --no-progress --minimum-priority "Medium High" diff --git a/.github/workflows/pmd.yml b/.github/workflows/pmd.yml index ff1148e..aecd726 100644 --- a/.github/workflows/pmd.yml +++ b/.github/workflows/pmd.yml @@ -16,10 +16,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Run PMD id: pmd diff --git a/.prettierrc b/.prettierrc index b017f19..13c5173 100755 --- a/.prettierrc +++ b/.prettierrc @@ -1,50 +1,83 @@ { + "arrowParens": "avoid", + "bracketSpacing": true, + "bracketSameLine": true, + "printWidth": 120, + "semi": true, + "singleQuote": true, + "tabWidth": 4, "trailingComma": "none", - "apexInsertFinalNewline": false, "endOfLine": "lf", + "apexInsertFinalNewline": false, "useTabs": true, - "printWidth": 160, - "tabWidth": 2, - "singleQuote": true, "overrides": [ { "files": "**/lwc/**/*.html", "options": { "parser": "lwc" } }, - { - "files": "*.{cmp,page,component}", - "options": { "parser": "html" } - }, { "files": "*.{cls,trigger}", "options": { "parser": "apex", "tabWidth": 2, "useTabs": true } }, + { + "files": "*.trigger", + "options": { "printWidth": 200 } + }, + { + "files": "*.{cmp,page,component}", + "options": { + "parser": "html", + "useTabs": true, + "htmlWhitespaceSensitivity": "css" + } + }, { "files": "*.{apex,soql}", - "options": { "parser": "anonymous-apex" } + "options": { "parser": "apex-anonymous" } + }, + { + "files": "*.{yml,yaml}", + "options": { "parser": "yaml", "tabWidth": 2, "useTabs": false } }, { - "files": "*.{yaml,yml}", - "options": { "useTabs": false, "tabWidth": 2, "singleQuote": true } + "files": ".prettier*", + "options": { "parser": "json", "printWidth": 80, "useTabs": true } }, { - "files": "doc*/*.js", + "files": "*.xml", "options": { - "parser": "babel", - "singleQuote": false + "parser": "xml", + "useTabs": true, + "singleQuote": false, + "xmlSelfClosingSpace": true } }, { - "files": "*.{prettierrc, json}", + "files": ["**/pmd/*.xml", "*ruleset*.xml", "config/**/*.xml"], "options": { - "parser": "json", - "printWidth": 80, - "useTabs": true, - "singleQuote": false + "parser": "xml", + "xmlSelfClosingSpace": true, + "xmlWhitespaceSensitivity": "ignore" + } + }, + { + "files": "*meta.xml", + "options": { + "parser": "xml", + "useTabs": false, + "xmlSelfClosingSpace": false + } + }, + { + "files": "*.json", + "options": { + "parser": "json-stringify", + "useTabs": false, + "tabWidth": 2 } }, { - "files": "docs/*.html", + "files": "doc*/*.html", "options": { "parser": "html", "useTabs": true, diff --git a/doc-assets/changelog.html b/doc-assets/changelog.html index c22790c..b716b8f 100644 --- a/doc-assets/changelog.html +++ b/doc-assets/changelog.html @@ -1,368 +1,580 @@

Changelog

-

1.5.0 (2024-02-15)

+

+ 1.6.0 + (2024-03-09) +

Features

+

Performance Improvements

+ +

Documentation

+ +

+ 1.5.0 + (2024-02-15) +

+

Features

+

Chores

Documentation

Tests

Styles

-

1.4.0 (2023-09-17)

+

+ 1.4.0 + (2023-09-17) +

Features

Documentation

Continuous Integration

-

1.3.0 (2023-08-19)

+

+ 1.3.0 + (2023-08-19) +

Features

Bug Fixes

Documentation

-

1.2.1 (2023-08-16)

+

+ 1.2.1 + (2023-08-16) +

Build System

Documentation

Bug Fixes

Chores

-

1.2.0 (2023-03-14)

+

+ 1.2.0 + (2023-03-14) +

Features

Bug Fixes

Continuous Integration

Build System

-

1.1.0 (2023-02-08)

+

+ 1.1.0 + (2023-02-08) +

Features

Bug Fixes

Miscellaneous Chores

-

1.1.0 (2023-02-07)

+

+ 1.1.0 + (2023-02-07) +

Features

Bug Fixes

Miscellaneous Chores

diff --git a/doc-assets/main.html b/doc-assets/main.html index 9ad1105..d8d5d9b 100644 --- a/doc-assets/main.html +++ b/doc-assets/main.html @@ -2,53 +2,61 @@

Record Types

- This is a project based on work by Evan Callahan (formerly of Groundwire, and now at Salesforce) who wrote - this class (repo has been deleted - Sadface) a - long time ago to reduce the number of describe calls required to work with Record Types. + This is a project based on work by + Evan Callahan + (formerly of Groundwire, and now at Salesforce) who wrote + this class + (repo has been deleted - Sadface) a long time ago to reduce the number of describe calls required to work with Record Types.

- I've updated the project (by pulling test code out of the main class - that's how old it was!) and have added some additional methods. The included - test class has 100% coverage, so pull this into your org and get cracking! + I've updated the project (by pulling test code out of the main class - that's how old it was!) and have added some additional methods. The + included test class has 100% coverage, so pull this into your org and get cracking!

Of note: The test code assumes that you have no record types for the Solution object. If you do, you may need to remove that test method.

Dependabot - codecov - On Push - Scratch Org Tests + Known Vulnerabilities + + codecov + + + On Push + + + Scratch Org Tests + Salesforce API Version + alt="Salesforce API Version" /> Release GitHub License

- Twitter + + Twitter + GitHub

The Code

-

The class and test class are found in this folder. Feel free to copy/paste directly into your org.

+

+ The class and test class are found in this + folder + . Feel free to copy/paste directly into your org. +

Features

- Given combinations of an sObject name, Record Type name, Record Type developer name, and Record Type Id, this class will let you return the other possible - parameters. Give it an sObject name and a Record Type developer name, and get the Record Type Id. + Given combinations of an sObject name, Record Type name, Record Type developer name, and Record Type Id, this class will let you return the other + possible parameters. Give it an sObject name and a Record Type developer name, and get the Record Type Id.

The main purpose is to minimize describe calls, which will speed up your code.

Documentation

- Documentation (generated with - ApexDox) + Documentation + (generated with + ApexDox + )

Package Installation

@@ -59,8 +67,15 @@

Package Installation

Installation (with VCS)

-

Clone this repository and run bash scripts/orginit.sh to set up a scratch org with the classes installed and a single Account Record Type.

-

To set up a scratch org without creating a Record Type, run bash scripts/orginit-norecordtypes.sh

+

+ Clone this repository and run + bash scripts/orginit.sh + to set up a scratch org with the classes installed and a single Account Record Type. +

+

+ To set up a scratch org without creating a Record Type, run + bash scripts/orginit-norecordtypes.sh +

Changelog