Skip to content

Commit 9cdeb41

Browse files
committed
feat(cli): Cognitive Complexity
1 parent 0a17fdb commit 9cdeb41

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/cli/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,27 @@ Executing DML operations (insert, update, delete) inside a loop is a high-risk a
120120
**Class Name:** _[DMLStatementInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/DMLStatementInLoop.ts)_
121121
**Severity:** 🔴 *Error*
122122

123-
#### Hardcoded Salesforce Id
123+
#### Hardcoded Id
124124
Avoid hard-coding record IDs, as they are unique to a specific org and will not work in other environments. Instead, store IDs in variables—such as merge-field URL parameters or a **Get Records** element—to make the Flow portable, maintainable, and flexible.
125125

126126
**Rule ID:** `hardcoded-id`
127127
**Class Name:** _[HardcodedId](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedId.ts)_
128128
**Severity:** 🔴 *Error*
129129

130-
#### Hardcoded Salesforce Url
131-
Avoid hard-coding URLs, as they may change between environments or over time. Instead, store URLs in variables or custom settings to make the Flow adaptable, maintainable, and environment-independent.
132-
133-
**Rule ID:** `hardcoded-url`
134-
**Class Name:** _[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedUrl.ts)_
135-
**Severity:** 🔴 *Error*
136-
137130
#### Hardcoded Secret ![Beta](https://img.shields.io/badge/status-beta-yellow)
138131
Avoid hardcoding secrets, API keys, tokens, or credentials in Flows. These should be stored securely in Named Credentials, Custom Settings, Custom Metadata, or external secret management systems.
139132

140133
**Rule ID:** `hardcoded-secret`
141134
**Class Name:** _[HardcodedSecret](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedSecret.ts)_
142135
**Severity:** 🔴 *Error*
143136

137+
#### Hardcoded Url
138+
Avoid hard-coding URLs, as they may change between environments or over time. Instead, store URLs in variables or custom settings to make the Flow adaptable, maintainable, and environment-independent.
139+
140+
**Rule ID:** `hardcoded-url`
141+
**Class Name:** _[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedUrl.ts)_
142+
**Severity:** 🔴 *Error*
143+
144144
#### Process Builder
145145
Process Builder is retired. Continuing to use it increases maintenance overhead and risks future compatibility issues. Migrating automation to Flow reduces risk and improves maintainability.
146146

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lightning-flow-scanner",
3-
"version": "6.18.2",
3+
"version": "6.19.0",
44
"bugs": "https://github.com/Flow-Scanner/lightning-flow-scanner/issues",
55
"description": "A Salesforce CLI plugin for analysis and optimization of Salesforce Flow. Scans metadata for 20+ issues such as hardcoded IDs, unsafe contexts, inefficient SOQL/DML operations, recursion risks, and missing fault handling. Supports auto-fixes, rule configurations, and CI/CD integration to help users maintain secure and reliable Flow automations.",
66
"dependencies": {

0 commit comments

Comments
 (0)