Skip to content

Commit

Permalink
CHANGE(Other): @W-15325513@: Update all our old doc URLs to point to …
Browse files Browse the repository at this point in the history
…new sf docs (#1417)
  • Loading branch information
stephen-carter-at-sf authored Mar 25, 2024
1 parent ac5751f commit 63a13a4
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/0scanner_run_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/1scanner_run_dfa_bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sfge/src/main/java/com/salesforce/rules/AbstractRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Type> SOURCE_TYPES = ImmutableSet.copyOf(Type.values());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class RemoveUnusedMethod extends AbstractPathBasedRule {
private static final ImmutableSet<ApexPathSource.Type> 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() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ApexPathSource.Type> SOURCE_TYPES =
ImmutableSet.copyOf(ApexPathSource.Type.values());
Expand Down
4 changes: 2 additions & 2 deletions sfge/src/main/java/com/salesforce/rules/Violation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand All @@ -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";
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/output/SarifOutputFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/lib/output/ResultsFormatting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 63a13a4

Please sign in to comment.