Skip to content

Commit 5f195ba

Browse files
committed
feat(action): Cognitive Complexity
1 parent acb6107 commit 5f195ba

File tree

4 files changed

+333
-34
lines changed

4 files changed

+333
-34
lines changed

packages/action/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,27 +156,27 @@ Executing DML operations (insert, update, delete) inside a loop is a high-risk a
156156
**Class Name:** _[DMLStatementInLoop](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/DMLStatementInLoop.ts)_
157157
**Severity:** 🔴 *Error*
158158
159-
#### Hardcoded Salesforce Id
159+
#### Hardcoded Id
160160
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.
161161
162162
**Rule ID:** `hardcoded-id`
163163
**Class Name:** _[HardcodedId](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedId.ts)_
164164
**Severity:** 🔴 *Error*
165165
166-
#### Hardcoded Salesforce Url
167-
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.
168-
169-
**Rule ID:** `hardcoded-url`
170-
**Class Name:** _[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedUrl.ts)_
171-
**Severity:** 🔴 *Error*
172-
173166
#### Hardcoded Secret ![Beta](https://img.shields.io/badge/status-beta-yellow)
174167
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.
175168
176169
**Rule ID:** `hardcoded-secret`
177170
**Class Name:** _[HardcodedSecret](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedSecret.ts)_
178171
**Severity:** 🔴 *Error*
179172
173+
#### Hardcoded Url
174+
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.
175+
176+
**Rule ID:** `hardcoded-url`
177+
**Class Name:** _[HardcodedUrl](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/HardcodedUrl.ts)_
178+
**Severity:** 🔴 *Error*
179+
180180
#### Process Builder
181181
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.
182182
@@ -279,7 +279,7 @@ Before-save Flows can safely update the triggering record directly via $Record,
279279
**Class Name:** _[SameRecordFieldUpdates](https://github.com/Flow-Scanner/lightning-flow-scanner/blob/main/packages/core/src/main/rules/SameRecordFieldUpdates.ts)_
280280
**Severity:** 🟡 *Warning*
281281
282-
#### Cognitive Complexity
282+
#### Cognitive Complexity ![Beta](https://img.shields.io/badge/status-beta-yellow)
283283
Flows with deeply nested loops and decisions are hard to understand. Unlike cyclomatic complexity which counts paths, cognitive complexity penalizes nesting depth. Consider extracting nested logic into subflows.
284284
285285
**Rule ID:** `cognitive-complexity`

0 commit comments

Comments
 (0)