From 63a13a45204a34ab5d2377acfb72af1366fae440 Mon Sep 17 00:00:00 2001 From: Stephen Carter <123964848+stephen-carter-at-sf@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:12:06 -0400 Subject: [PATCH] CHANGE(Other): @W-15325513@: Update all our old doc URLs to point to new sf docs (#1417) --- .github/ISSUE_TEMPLATE/0scanner_run_bug.md | 2 +- .github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md | 8 ++++---- README.md | 2 +- package.json | 2 +- sfge/src/main/java/com/salesforce/rules/AbstractRule.java | 2 +- .../java/com/salesforce/rules/ApexFlsViolationRule.java | 2 +- .../salesforce/rules/ApexNullPointerExceptionRule.java | 2 +- .../salesforce/rules/AvoidDatabaseOperationInLoop.java | 2 +- .../salesforce/rules/AvoidMultipleMassSchemaLookups.java | 2 +- .../salesforce/rules/PerformNullCheckOnSoqlVariables.java | 2 +- .../java/com/salesforce/rules/RemoveUnusedMethod.java | 2 +- .../java/com/salesforce/rules/UnimplementedTypeRule.java | 2 +- .../rules/UseWithSharingOnDatabaseOperation.java | 2 +- sfge/src/main/java/com/salesforce/rules/Violation.java | 4 ++-- src/lib/output/SarifOutputFormatter.ts | 2 +- test/lib/output/ResultsFormatting.test.ts | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/0scanner_run_bug.md b/.github/ISSUE_TEMPLATE/0scanner_run_bug.md index a0b7c0eb7..8c434e81c 100644 --- a/.github/ISSUE_TEMPLATE/0scanner_run_bug.md +++ b/.github/ISSUE_TEMPLATE/0scanner_run_bug.md @@ -11,7 +11,7 @@ assignees: '' Oftentimes, you can resolve `scanner run` issues on your own. Follow these steps. 1. Read the error message. -2. Read [Salesforce Code Analyzer](https://forcedotcom.github.io/sfdx-scanner/) documentation. +2. Read [Salesforce Code Analyzer](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview) documentation. 3. Double-check the command that you ran. Ensure that items like file names, method names, and category names are correctly spelled and cased. 4. Verify that your code is syntactically valid. 5. Verify that the error is reproducible on another machine. diff --git a/.github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md b/.github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md index 372672598..9ea12eae8 100644 --- a/.github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md +++ b/.github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md @@ -11,10 +11,10 @@ assignees: '' Oftentimes, you can resolve `scanner run dfa` issues on your own. Follow these steps. 1. Read the error message. -2. Read [Salesforce Graph Engine](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/introduction/) documentation. -3. Read our guide for [troubleshooting Graph Engine errors](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/troubleshooting/#issues-using-salesforce-graph-engine). -4. Read our guidelines to resolve [LimitReached errors](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/working-with-sfge/#understand-limitreached-errors) and [path evaluation timeouts](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/troubleshooting/#issues-using-salesforce-graph-engine). -5. Read our [Guide to Writing Graph Engine-Friendly Code](https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/graph-engine-recommendations/). +2. Read [Salesforce Graph Engine](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/salesforce-graph-engine.html) documentation. +3. Read our guide for [troubleshooting Graph Engine errors](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/troubleshooting.html). +4. Read our guidelines to resolve [LimitReached errors](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/working-with-graph-engine.html#limitreached-errors) and [path evaluation timeouts](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/troubleshooting.html#issues-using-salesforce-graph-engine). +5. Read our [Guide to Writing Graph Engine-Friendly Code](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/graph-engine-friendly-code.html). 6. Double-check the command that you entered. Ensure that items like file names, method names, and category names are correctly spelled and cased. 7. Verify that your code is syntactically valid. 8. Verify that the error is reproducible on another machine. diff --git a/README.md b/README.md index 7be3cdcc3..7500a9fd9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Code Analyzer current supports the PMD rule engine, PMD Copy Paste Detector, ESL Integrate Code Analyzer into your Continuous Integration/Continuous Development (CI/CD) process to enforce rules that you define and to produce high-quality code. # Salesforce Code Analyzer Documentation -Read [Salesforce Code Analyzer](https://forcedotcom.github.io/sfdx-scanner/) documentation to learn: +Read [Salesforce Code Analyzer](https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview) documentation to learn: * how to install Code Analyzer * what is included in the Code Analyzer command reference * the structure of Code Analyzer architecture diff --git a/package.json b/package.json index 322ef5f63..6273f1ba4 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "/retire-js", "/oclif.lock" ], - "homepage": "https://forcedotcom.github.io/sfdx-scanner", + "homepage": "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/overview", "keywords": [ "sfdx-plugin", "sf-plugin" diff --git a/sfge/src/main/java/com/salesforce/rules/AbstractRule.java b/sfge/src/main/java/com/salesforce/rules/AbstractRule.java index b7aabbd3a..a3d1125ab 100644 --- a/sfge/src/main/java/com/salesforce/rules/AbstractRule.java +++ b/sfge/src/main/java/com/salesforce/rules/AbstractRule.java @@ -63,7 +63,7 @@ protected boolean isPilot() { * Unless the rule has a predetermined URL, we'll return a link to information about the engine. */ protected String getUrl() { - return "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/"; + return "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/salesforce-graph-engine.html"; } public static class Descriptor { diff --git a/sfge/src/main/java/com/salesforce/rules/ApexFlsViolationRule.java b/sfge/src/main/java/com/salesforce/rules/ApexFlsViolationRule.java index eddaa483f..d47031590 100644 --- a/sfge/src/main/java/com/salesforce/rules/ApexFlsViolationRule.java +++ b/sfge/src/main/java/com/salesforce/rules/ApexFlsViolationRule.java @@ -37,7 +37,7 @@ public final class ApexFlsViolationRule extends AbstractPathTraversalRule { * again. */ static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#ApexFlsViolationRule"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/apexflsviolation-rule.html"; private static final String DESCRIPTION = "Identifies data read/write operations that may not have CRUD/FLS"; diff --git a/sfge/src/main/java/com/salesforce/rules/ApexNullPointerExceptionRule.java b/sfge/src/main/java/com/salesforce/rules/ApexNullPointerExceptionRule.java index ad7f60e76..b80c49aca 100644 --- a/sfge/src/main/java/com/salesforce/rules/ApexNullPointerExceptionRule.java +++ b/sfge/src/main/java/com/salesforce/rules/ApexNullPointerExceptionRule.java @@ -15,7 +15,7 @@ */ public final class ApexNullPointerExceptionRule extends AbstractPathAnomalyRule { private static final String URL = - "https://forcedotcom.github.io./sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#ApexNullPointerExceptionRule"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/apexnullpointerexception-rule.html"; // ApexNullPointerExceptionRule cares about all sources, since they're all equally capable // of throwing NPEs. private static final ImmutableSet SOURCE_TYPES = ImmutableSet.copyOf(Type.values()); diff --git a/sfge/src/main/java/com/salesforce/rules/AvoidDatabaseOperationInLoop.java b/sfge/src/main/java/com/salesforce/rules/AvoidDatabaseOperationInLoop.java index fd3ec6b90..f4c3aa287 100644 --- a/sfge/src/main/java/com/salesforce/rules/AvoidDatabaseOperationInLoop.java +++ b/sfge/src/main/java/com/salesforce/rules/AvoidDatabaseOperationInLoop.java @@ -17,7 +17,7 @@ public final class AvoidDatabaseOperationInLoop extends AbstractPathTraversalRul ImmutableSet.copyOf(ApexPathSource.Type.values()); private static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#AvoidDatabaseOperationInLoop"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/avoiddatabaseoperationinloop-rule.html"; private final AvoidDatabaseOperationInLoopHandler ruleHandler; diff --git a/sfge/src/main/java/com/salesforce/rules/AvoidMultipleMassSchemaLookups.java b/sfge/src/main/java/com/salesforce/rules/AvoidMultipleMassSchemaLookups.java index 428f57392..3dfb92d80 100644 --- a/sfge/src/main/java/com/salesforce/rules/AvoidMultipleMassSchemaLookups.java +++ b/sfge/src/main/java/com/salesforce/rules/AvoidMultipleMassSchemaLookups.java @@ -20,7 +20,7 @@ public class AvoidMultipleMassSchemaLookups extends AbstractPathTraversalRule { private final MultipleMassSchemaLookupRuleHandler ruleHandler; private static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#AvoidMultipleMassSchemaLookups"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/avoidmultiplemassschemalookup-rule.html"; private AvoidMultipleMassSchemaLookups() { ruleHandler = MultipleMassSchemaLookupRuleHandler.getInstance(); diff --git a/sfge/src/main/java/com/salesforce/rules/PerformNullCheckOnSoqlVariables.java b/sfge/src/main/java/com/salesforce/rules/PerformNullCheckOnSoqlVariables.java index dca0eaf3c..bec59d428 100644 --- a/sfge/src/main/java/com/salesforce/rules/PerformNullCheckOnSoqlVariables.java +++ b/sfge/src/main/java/com/salesforce/rules/PerformNullCheckOnSoqlVariables.java @@ -23,7 +23,7 @@ public final class PerformNullCheckOnSoqlVariables extends AbstractPathTraversal ImmutableSet.copyOf(ApexPathSource.Type.values()); private static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#PerformNullCheckOnSoqlVariables"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/performnullcheckonsoqlvariables-rule.html"; // don't instantiate private PerformNullCheckOnSoqlVariables() {} diff --git a/sfge/src/main/java/com/salesforce/rules/RemoveUnusedMethod.java b/sfge/src/main/java/com/salesforce/rules/RemoveUnusedMethod.java index 40890e990..829d6506f 100644 --- a/sfge/src/main/java/com/salesforce/rules/RemoveUnusedMethod.java +++ b/sfge/src/main/java/com/salesforce/rules/RemoveUnusedMethod.java @@ -42,7 +42,7 @@ public final class RemoveUnusedMethod extends AbstractPathBasedRule { private static final ImmutableSet SOURCE_TYPES = ImmutableSet.copyOf(ApexPathSource.Type.values()); private static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#RemoveUnusedMethod"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/removeunusedmethod-rule.html"; private RemoveUnusedMethod() {} diff --git a/sfge/src/main/java/com/salesforce/rules/UnimplementedTypeRule.java b/sfge/src/main/java/com/salesforce/rules/UnimplementedTypeRule.java index 6b9232c7f..84f50fb60 100644 --- a/sfge/src/main/java/com/salesforce/rules/UnimplementedTypeRule.java +++ b/sfge/src/main/java/com/salesforce/rules/UnimplementedTypeRule.java @@ -17,7 +17,7 @@ public class UnimplementedTypeRule extends AbstractStaticRule { private static final String URL = - "https://forcedotcom.github.io./sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#UnimplementedTypeRule"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/unimplementedtype-rule.html"; private static final String ABSTRACT_CLASS = "abstract class"; private static final String INTERFACE = "interface"; diff --git a/sfge/src/main/java/com/salesforce/rules/UseWithSharingOnDatabaseOperation.java b/sfge/src/main/java/com/salesforce/rules/UseWithSharingOnDatabaseOperation.java index 50956dda3..6e6517a84 100644 --- a/sfge/src/main/java/com/salesforce/rules/UseWithSharingOnDatabaseOperation.java +++ b/sfge/src/main/java/com/salesforce/rules/UseWithSharingOnDatabaseOperation.java @@ -14,7 +14,7 @@ public final class UseWithSharingOnDatabaseOperation extends AbstractPathTraversalRule { private static final String URL = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/rules/#UseWithSharingOnDatabaseOperation"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/usewithsharingondatabaseoperation-rule.html"; private static final ImmutableSet SOURCE_TYPES = ImmutableSet.copyOf(ApexPathSource.Type.values()); diff --git a/sfge/src/main/java/com/salesforce/rules/Violation.java b/sfge/src/main/java/com/salesforce/rules/Violation.java index 197ad14ec..6a436e152 100644 --- a/sfge/src/main/java/com/salesforce/rules/Violation.java +++ b/sfge/src/main/java/com/salesforce/rules/Violation.java @@ -324,7 +324,7 @@ public LimitReachedViolation(String message, SFVertex vertex) { this.description = ""; this.severity = AbstractRule.SEVERITY.LOW.code; this.url = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/working-with-sfge/#understand-outofmemory-errors"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/working-with-graph-engine.html#limitreached-errors"; } } @@ -340,7 +340,7 @@ public UserActionViolation(String message, SFVertex vertex) { this.description = ""; this.severity = AbstractRule.SEVERITY.LOW.code; this.url = - "https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/working-with-sfge/"; + "https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/working-with-graph-engine.html"; } } diff --git a/src/lib/output/SarifOutputFormatter.ts b/src/lib/output/SarifOutputFormatter.ts index 67b4bf262..e9014da2b 100644 --- a/src/lib/output/SarifOutputFormatter.ts +++ b/src/lib/output/SarifOutputFormatter.ts @@ -328,7 +328,7 @@ class SfgeSarifFormatter extends SarifFormatter { driver: { name: ENGINE.SFGE, version: SFGE_VERSION, - informationUri: 'https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/introduction/', + informationUri: 'https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/salesforce-graph-engine.html', rules: [] } } diff --git a/test/lib/output/ResultsFormatting.test.ts b/test/lib/output/ResultsFormatting.test.ts index 1cb73c72d..c9db65beb 100644 --- a/test/lib/output/ResultsFormatting.test.ts +++ b/test/lib/output/ResultsFormatting.test.ts @@ -592,7 +592,7 @@ describe('Results Formatting', () => { const driver = run['tool']['driver']; expect(driver.name).to.equal(ENGINE.SFGE); expect(driver.version).to.equal(SFGE_VERSION); - expect(driver.informationUri).to.equal('https://forcedotcom.github.io/sfdx-scanner/en/v3.x/salesforce-graph-engine/introduction/'); + expect(driver.informationUri).to.equal('https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/salesforce-graph-engine.html'); // tool.driver.rules expect(driver['rules']).to.have.lengthOf(1, 'Incorrect rule count');