Skip to content

Commit

Permalink
feat: cleanup PMD violations (#175)
Browse files Browse the repository at this point in the history
* feat: clean PMD violations

* update pmd call

* latest java
  • Loading branch information
dschach authored Jul 29, 2024
1 parent a0470ee commit 864a310
Show file tree
Hide file tree
Showing 17 changed files with 868 additions and 575 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions .github/workflows/pmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
73 changes: 53 additions & 20 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Loading

0 comments on commit 864a310

Please sign in to comment.