Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Commit bd2cf46

Browse files
committed
demo mono repo
1 parent f644389 commit bd2cf46

File tree

66 files changed

+257
-382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+257
-382
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,15 @@ npm install @flow-scanner/lightning-flow-scanner-core
368368
npm run test
369369
```
370370

371-
5. Test as local dependency(Optional):
371+
5. Deploy Demo Flows (Optional):
372+
373+
```bash
374+
cd assets/example-flows && sf project deploy start &&
375+
```
376+
377+
Navigate to the [Demo Readme](assets\example-flows\README.md) for full details
378+
379+
6. Test as local dependency(Optional):
372380
a. run:
373381

374382
```bash
@@ -383,7 +391,7 @@ npm install @flow-scanner/lightning-flow-scanner-core
383391

384392
Your local module will now replace any installed version and update on rebuild.
385393

386-
6. Create a standalone UMD Module(Optional):
394+
7. Create a standalone UMD Module(Optional):
387395

388396
```bash
389397
npm run vite:dist // creates UMD at`dist/lightning-flow-scanner-core.umd.js`.

assets/example-flows/.forceignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
assets\example-flows\force-app\main\default\flows\testing

assets/example-flows/README.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
# Lightning Flow Scanner Demo Repository
22

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.
44

55
You can:
66

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 |
928

1029
## Getting Started
1130

1231
Follow these steps to get up and running with the Lightning Flow Scanner Example Flows:
1332

14-
### Step 1: Clone the Repository
33+
1. To open this [Salesforce Project](assets\example-flows) in CLI:
1534

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+
```
1738

18-
### Step 2: Open in Editor
39+
2. Deploy Flows(optional)
1940

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+
```

assets/example-flows/force-app/main/default/flows/DML_Statement_In_A_Loop_Fixed.flow-meta.xml

Lines changed: 0 additions & 143 deletions
This file was deleted.

assets/example-flows/force-app/main/default/flows/Hardcoded_Id.flow-meta.xml renamed to assets/example-flows/force-app/main/default/flows/demo/Hardcoded_Id.flow-meta.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@
8080
<isOutput>false</isOutput>
8181
<objectType>Account</objectType>
8282
</variables>
83-
<triggerOrder>10</triggerOrder>
8483
</Flow>

0 commit comments

Comments
 (0)