|
1 | 1 | # Lightning Flow Scanner Demo Repository |
2 | 2 |
|
3 | | -This directory contains sample Salesforce Flows used to test Lightning Flow Scanner rules. |
| 3 | +This directory contains sample Salesforce Flows used to demo Lightning Flow Scanner rules. |
4 | 4 |
|
5 | 5 | You can: |
6 | 6 |
|
7 | | -- Add new flows that trigger specific rules |
8 | | -- Use these flows to demo scanner output |
| 7 | +- Use these flows to demo scanner output. |
| 8 | +- Deploy them to an Org for integrated tests. |
| 9 | + |
| 10 | +## Available Flows |
| 11 | + |
| 12 | +| Flow Name | Description | Key Rule(s) Demonstrated | |
| 13 | +|----------------------------|---------------------------------------------------------------------|-------------------------------| |
| 14 | +| Copy_API_Name | Flow with copied elements retaining similar API names, reducing readability. | CopyAPIName | |
| 15 | +| Cyclomatic_Complexity | High-complexity Flow with multiple loops/decisions in a single path. | CyclomaticComplexity | |
| 16 | +| DML_Statement_In_A_Loop | DML operations inside loops, risking governor limits. | DMLStatementInLoop | |
| 17 | +| Duplicate_DML_Operation | DML between screens, allowing backward navigation duplicates. | DuplicateDMLOperation | |
| 18 | +| FlowNamingConvention | Flow with non-descriptive or inconsistent naming. | FlowName | |
| 19 | +| Hardcoded_Id | Flow using org-specific hardcoded IDs instead of variables. | HardcodedId | |
| 20 | +| Missing_Error_Handler | Flow lacking fault paths for error handling. | MissingFaultPath | |
| 21 | +| Missing_Flow_Description | Flow without a description for documentation. | FlowDescription | |
| 22 | +| Missing_Null_Handler | Get Records without null checks post-query. | MissingNullHandler | |
| 23 | +| Outdated_API_Version | Flow using an old API version (pre-50.0). | APIVersion | |
| 24 | +| SOQL_Query_In_A_Loop | SOQL queries inside loops, hitting limits. | SOQLQueryInLoop | |
| 25 | +| Unconnected_Element | Flow with unused/unconnected elements. | UnconnectedElement | |
| 26 | +| Unsafe_Running_Context | Flow set to System Mode without Sharing. | UnsafeRunningContext | |
| 27 | +| Unused_Variable | Flow declaring variables not referenced. | UnusedVariable | |
9 | 28 |
|
10 | 29 | ## Getting Started |
11 | 30 |
|
12 | 31 | Follow these steps to get up and running with the Lightning Flow Scanner Example Flows: |
13 | 32 |
|
14 | | -### Step 1: Clone the Repository |
| 33 | +1. To open this [Salesforce Project](assets\example-flows) in CLI: |
15 | 34 |
|
16 | | -To clone the repository, press Ctrl+Shift+P on Windows or Shift+⌘+P on macOS to open the command palette and use the Git Clone command. |
| 35 | + ```bash |
| 36 | + cd assets/example-flows |
| 37 | + ``` |
17 | 38 |
|
18 | | -### Step 2: Open in Editor |
| 39 | +2. Deploy Flows(optional) |
19 | 40 |
|
20 | | -When prompted, select to open the repository. This will open the cloned repository in your preferred code editor. You can also click the link below |
21 | | - |
22 | | -### Step 3: Run Flow Commands |
23 | | - |
24 | | -Press Ctrl+Shift+P on Windows or Shift+⌘+P on macOS to open the command palette and type `Flow` to see the available commands from Lightning Flow Scanner. From here you can run the scanning functionality. |
| 41 | + ```bash |
| 42 | + sf project deploy start --source-dir force-app/main/default |
| 43 | + ``` |
0 commit comments