Skip to content

Commit cb035be

Browse files
committed
rv main
1 parent 3d31043 commit cb035be

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

readme.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Lightning Flow Scanner Banner](https://raw.githubusercontent.com/Flow-Scanner/lightning-flow-scanner-core/master/media/bannerslim.png)](https://github.com/Flow-Scanner)
1+
[![Lightning Flow Scanner Banner](https://raw.githubusercontent.com/Flow-Scanner/lightning-flow-scanner-core/main/media/bannerslim.png)](https://github.com/Flow-Scanner)
22

33
- [Default Rules](#default-rules)
44
- [Core Functions](#core-functions)
@@ -21,113 +21,113 @@ _https://github.com/Flow-Scanner/lightning-flow-scanner-core?tab=readme-ov-file#
2121

2222
### Action Calls In Loop
2323

24-
_[ActionCallsInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/ActionCallsInLoop.ts)_ - To prevent exceeding Apex governor limits, it is advisable to consolidate and bulkify your apex calls, utilizing a single action call containing a collection variable at the end of the loop.
24+
_[ActionCallsInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/ActionCallsInLoop.ts)_ - To prevent exceeding Apex governor limits, it is advisable to consolidate and bulkify your apex calls, utilizing a single action call containing a collection variable at the end of the loop.
2525

2626
### Outdated API Version
2727

28-
_[APIVersion](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/APIVersion.ts)_ - Introducing newer API components may lead to unexpected issues with older versions of Flows, as they might not align with the underlying mechanics. Starting from API version 50.0, the **Api Version** attribute has been readily available on the Flow Object. To ensure smooth operation and reduce discrepancies between API versions, it is strongly advised to regularly update and maintain them.
28+
_[APIVersion](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/APIVersion.ts)_ - Introducing newer API components may lead to unexpected issues with older versions of Flows, as they might not align with the underlying mechanics. Starting from API version 50.0, the **Api Version** attribute has been readily available on the Flow Object. To ensure smooth operation and reduce discrepancies between API versions, it is strongly advised to regularly update and maintain them.
2929

3030
### Auto Layout
3131

32-
_[AutoLayout](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/AutoLayout.ts)_ - With Canvas Mode set to Auto‑Layout, elements are spaced, connected, and aligned automatically, keeping your Flow neatly organized—saving you time.
32+
_[AutoLayout](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/AutoLayout.ts)_ - With Canvas Mode set to Auto‑Layout, elements are spaced, connected, and aligned automatically, keeping your Flow neatly organized—saving you time.
3333

3434
### Copy API Name
3535

36-
_[CopyAPIName](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/CopyAPIName.ts)_ - Maintaining multiple elements with a similar name, like `Copy_X_Of_Element`, can diminish the overall readability of your Flow. When copying and pasting these elements, remember to update the API name of the newly created copy.
36+
_[CopyAPIName](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/CopyAPIName.ts)_ - Maintaining multiple elements with a similar name, like `Copy_X_Of_Element`, can diminish the overall readability of your Flow. When copying and pasting these elements, remember to update the API name of the newly created copy.
3737

3838
### Cyclomatic Complexity
3939

40-
_[CyclomaticComplexity](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/CyclomaticComplexity.ts)_ - The number of loops and decision rules, plus the number of decisions. Use a combination of 1) subflows and 2) breaking flows into multiple concise trigger‑ordered flows to reduce cyclomatic complexity within a single flow, ensuring maintainability and simplicity.
40+
_[CyclomaticComplexity](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/CyclomaticComplexity.ts)_ - The number of loops and decision rules, plus the number of decisions. Use a combination of 1) subflows and 2) breaking flows into multiple concise trigger‑ordered flows to reduce cyclomatic complexity within a single flow, ensuring maintainability and simplicity.
4141

4242
### DML Statement In A Loop
4343

44-
_[DMLStatementInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/DMLStatementInLoop.ts)_ - To prevent exceeding Apex governor limits, consolidate all your database operations—record creation, updates, or deletions—at the conclusion of the flow.
44+
_[DMLStatementInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/DMLStatementInLoop.ts)_ - To prevent exceeding Apex governor limits, consolidate all your database operations—record creation, updates, or deletions—at the conclusion of the flow.
4545

4646
### Duplicate DML Operation
4747

48-
_[DuplicateDMLOperation](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/DuplicateDMLOperation.ts)_ - When a flow executes database changes or actions between two screens, prevent users from navigating backward between screens; otherwise, duplicate database operations may be performed.
48+
_[DuplicateDMLOperation](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/DuplicateDMLOperation.ts)_ - When a flow executes database changes or actions between two screens, prevent users from navigating backward between screens; otherwise, duplicate database operations may be performed.
4949

5050
### Flow Naming Convention
5151

52-
_[FlowName](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/FlowName.ts)_ - The readability of a flow is paramount. Establishing a naming convention significantly enhances findability, searchability, and overall consistency. Include at least a domain and a brief description of the flow’s actions, for example `Service_OrderFulfillment`.
52+
_[FlowName](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/FlowName.ts)_ - The readability of a flow is paramount. Establishing a naming convention significantly enhances findability, searchability, and overall consistency. Include at least a domain and a brief description of the flow’s actions, for example `Service_OrderFulfillment`.
5353

5454
### Get Record All Fields
5555

56-
_[GetRecordAllFields](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/GetRecordAllFields.ts)_ - Following the principle of least privilege (PoLP), avoid using **Get Records** with “Automatically store all fields” unless necessary.
56+
_[GetRecordAllFields](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/GetRecordAllFields.ts)_ - Following the principle of least privilege (PoLP), avoid using **Get Records** with “Automatically store all fields” unless necessary.
5757

5858
### Hardcoded Id
5959

60-
_[HardcodedId](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/HardcodedId.ts)_ - Avoid hard‑coding IDs because they are org specific. Instead, pass them into variables at the start of the flow—via merge‑field URL parameters or a **Get Records** element.
60+
_[HardcodedId](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/HardcodedId.ts)_ - Avoid hard‑coding IDs because they are org specific. Instead, pass them into variables at the start of the flow—via merge‑field URL parameters or a **Get Records** element.
6161

6262
### Hardcoded Url
6363

64-
_[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/HardcodedUrl.ts)_ - Avoid hard‑coding URLs because they are environment specific. Use an `$API` formula (preferred) or environment‑specific sources like custom labels, metadata, or settings.
64+
_[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/HardcodedUrl.ts)_ - Avoid hard‑coding URLs because they are environment specific. Use an `$API` formula (preferred) or environment‑specific sources like custom labels, metadata, or settings.
6565

6666
### Inactive Flow
6767

68-
_[InactiveFlow](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/InactiveFlow.ts)_ - Like cleaning out your closet: deleting unused flows is essential. Inactive flows can still cause trouble—such as accidentally deleting records during testing, or being activated as subflows.
68+
_[InactiveFlow](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/InactiveFlow.ts)_ - Like cleaning out your closet: deleting unused flows is essential. Inactive flows can still cause trouble—such as accidentally deleting records during testing, or being activated as subflows.
6969

7070
### Missing Fault Path
7171

72-
_[MissingFaultPath](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/MissingFaultPath.ts)_ - A flow may fail to execute an operation as intended. By default, the flow displays an error to the user and emails the creator. Customize this behavior by incorporating a Fault Path.
72+
_[MissingFaultPath](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/MissingFaultPath.ts)_ - A flow may fail to execute an operation as intended. By default, the flow displays an error to the user and emails the creator. Customize this behavior by incorporating a Fault Path.
7373

7474
### Missing Flow Description
7575

76-
_[FlowDescription](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/FlowDescription.ts)_ - Descriptions play a vital role in documentation. We highly recommend including details about where flows are used and their intended purpose.
76+
_[FlowDescription](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/FlowDescription.ts)_ - Descriptions play a vital role in documentation. We highly recommend including details about where flows are used and their intended purpose.
7777

7878
### Missing Null Handler
7979

80-
_[MissingNullHandler](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/MissingNullHandler.ts)_ - When a **Get Records** operation finds no data, it returns `null`. Validate data by using a Decision element to check for a non‑null result.
80+
_[MissingNullHandler](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/MissingNullHandler.ts)_ - When a **Get Records** operation finds no data, it returns `null`. Validate data by using a Decision element to check for a non‑null result.
8181

8282
### Process Builder
8383

84-
_[ProcessBuilder](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/ProcessBuilder.ts)_ - Salesforce is transitioning away from Workflow Rules and Process Builder in favor of Flow. Begin migrating your organization’s automation to Flow.
84+
_[ProcessBuilder](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/ProcessBuilder.ts)_ - Salesforce is transitioning away from Workflow Rules and Process Builder in favor of Flow. Begin migrating your organization’s automation to Flow.
8585

8686
### Recursive After Update
8787

88-
_[RecursiveAfterUpdate](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/RecursiveAfterUpdate.ts)_ - After‑update flows are meant for modifying **other** records. Using them on the same record can cause recursion. Consider **before‑save** flows for same‑record updates.
88+
_[RecursiveAfterUpdate](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/RecursiveAfterUpdate.ts)_ - After‑update flows are meant for modifying **other** records. Using them on the same record can cause recursion. Consider **before‑save** flows for same‑record updates.
8989

9090
### Same Record Field Updates
9191

92-
_[SameRecordFieldUpdates](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/SameRecordFieldUpdates.ts)_ - Similar to triggers, **before‑save** contexts can update the same record via `$Record` without invoking DML.
92+
_[SameRecordFieldUpdates](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/SameRecordFieldUpdates.ts)_ - Similar to triggers, **before‑save** contexts can update the same record via `$Record` without invoking DML.
9393

9494
### SOQL Query In A Loop
9595

96-
_[SOQLQueryInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/SOQLQueryInLoop.ts)_ - To prevent exceeding Apex governor limits, consolidate all SOQL queries at the end of the flow.
96+
_[SOQLQueryInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/SOQLQueryInLoop.ts)_ - To prevent exceeding Apex governor limits, consolidate all SOQL queries at the end of the flow.
9797

9898
### Trigger Order
9999

100-
_[TriggerOrder](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/TriggerOrder.ts)_ - Guarantee your flow execution order with the **Trigger Order** property introduced in Spring ’22.
100+
_[TriggerOrder](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/TriggerOrder.ts)_ - Guarantee your flow execution order with the **Trigger Order** property introduced in Spring ’22.
101101

102102
### Unconnected Element
103103

104-
_[UnconnectedElement](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/UnconnectedElement.ts)_ - Avoid unconnected elements that are not used by the flow to keep flows efficient and maintainable.
104+
_[UnconnectedElement](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/UnconnectedElement.ts)_ - Avoid unconnected elements that are not used by the flow to keep flows efficient and maintainable.
105105

106106
### Unsafe Running Context
107107

108-
_[UnsafeRunningContext](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/UnsafeRunningContext.ts)_ - This flow is configured to run in **System Mode without Sharing**, granting all users permission to view and edit all data. This can lead to unsafe data access.
108+
_[UnsafeRunningContext](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/UnsafeRunningContext.ts)_ - This flow is configured to run in **System Mode without Sharing**, granting all users permission to view and edit all data. This can lead to unsafe data access.
109109

110110
### Unused Variable
111111

112-
_[UnusedVariable](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/UnusedVariable.ts)_ - To maintain efficiency and manageability, avoid including variables that are never referenced.
112+
_[UnusedVariable](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/UnusedVariable.ts)_ - To maintain efficiency and manageability, avoid including variables that are never referenced.
113113

114114
---
115115

116116
## Core Functions
117117

118-
### [`getRules(ruleNames?: string[]): IRuleDefinition[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/libs/GetRuleDefinitions.ts)
118+
### [`getRules(ruleNames?: string[]): IRuleDefinition[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/libs/GetRuleDefinitions.ts)
119119

120120
_Retrieves rule definitions used in the scanner._
121121

122-
### [`parse(selectedUris: any): Promise<ParsedFlow[]>`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/libs/ParseFlows.ts)
122+
### [`parse(selectedUris: any): Promise<ParsedFlow[]>`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/libs/ParseFlows.ts)
123123

124124
_Parses metadata from selected Flow files._
125125

126-
### [`scan(parsedFlows: ParsedFlow[], ruleOptions?: IRulesConfig): ScanResult[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/libs/ScanFlows.ts)
126+
### [`scan(parsedFlows: ParsedFlow[], ruleOptions?: IRulesConfig): ScanResult[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/libs/ScanFlows.ts)
127127

128128
_Runs rules against parsed flows and returns scan results._
129129

130-
### [`fix(results: ScanResult[]): ScanResult[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/libs/FixFlows.ts)
130+
### [`fix(results: ScanResult[]): ScanResult[]`](https://github.com/Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/libs/FixFlows.ts)
131131

132132
_Attempts to apply automatic fixes where available._
133133

src/main/models/RuleCommon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class RuleCommon {
2222
this.supportedTypes = info.supportedTypes;
2323
this.label = info.label;
2424
this.description = info.description;
25-
this.uri = `https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-core/tree/master/src/main/rules/${info.name}.ts`;
25+
this.uri = `https://github.com/Lightning-Flow-Scanner/lightning-flow-scanner-core/tree/main/src/main/rules/${info.name}.ts`;
2626
this.docRefs = info.docRefs;
2727
this.isConfigurable = info.isConfigurable;
2828
this.autoFixable = info.autoFixable;

0 commit comments

Comments
 (0)