Releases: Lightning-Flow-Scanner/lightning-flow-scanner-core
Bug Fix: Handling multiple loops in Compiler
Handles an issue with the handling of Flows that have multiple loops
Bugfix Scheduled Flows
Bugfix for supporting scheduled flows in our compiler by @junners
and improving error handling for incorrect rule configuration
DML In Loop / SOQL Query In Loop Improvement
Release Note: DMLStatementInLoop Rule Enhancements
We're happy to announce significant enhancements to the DMLStatementInLoop rule in this release. These updates aim to boost accuracy in identifying DML statements within loops, including nested structures. Notably, the rule has been divided into two separate components: DMLStatementInLoop and SOQLQueryInLoop.
Changes:
-
DMLStatementInLoop Rule:
- The rule has undergone refinement to enhance accuracy in identifying DML statements within loops.
- The traversal logic has been improved to account for nested loops, ensuring precise detection of DML statements within these structures.
- To enhance maintainability, the rule has been split into a separate class.
-
SOQLQueryInLoop Rule:
- Introducing a new rule, SOQLQueryInLoop, which identifies instances of SOQL queries executed inside loops. This addition promotes best practices and aids in optimizing code for governor limits.
-
Flow Compiler Class:
- A new class, the Flow Compiler, has been introduced to elevate the capabilities of our rule-checking process. This addition allows for more sophisticated and uniform analyses of Salesforce flows.
We believe that these changes significantly enhance the functionality and accuracy of the DMLStatementInLoop rule, providing users with a more powerful tool for identifying potential issues related to DML statements and SOQL queries in loops. As always, we remain committed to providing tools that empower Salesforce developers to create high-quality and efficient Flow solutions.
As always, we appreciate your feedback. Feel free to reach out if you have any questions or suggestions.
Thank you for using our product!
improved MissingFaultPath
Issue: The "MissingFaultPath" rule previously considered all elements in a flow, which led to inaccurate results.
Resolution: The rule has been updated to exclude any element that is already part of a Fault Path, resulting in more accurate assessments of missing fault handlers.
Version: 2.24
Date:6 november 2023
Impact: This bugfix ensures that elements correctly receive or do not receive fault handling recommendations based on their actual fault path relationships. It enhances the accuracy of the rule's assessments in flows.
dependency upgrades & output improvements
Some refactoring for readability, package upgrades for security. Furthermore implements a result details class which preprocesses the results and assigns type specific details.
Fix False positives 'FlowDescription' & 'MissingDescription' rules
New Rule: Copy of API Name
Copy of API Name
Having multiple elements called Copy_X_Of_Element will decrease the readability of the Flow. If you copy and paste them, make sure to update the API name of the new copy.
Configuration ID: CopyOf (View source code)
Flow Naming Conventions & API Versions
Introducing two new configurable rules!
- Old API Version
- Flow Naming Convention
Old API version
Newer API components may cause older versions of Flows to start behaving incorrectly due to differences in the underlying mechanics. The Api Version has been available as an attribute on the Flow since API v50.0 and it is recommended to limit variation and to update them on a regular basis.
Default Value: >50.0
Configuration example:
APIVersion:
{
severity: 'error',
expression: '===58'
}
Configuration ID: APIVersion
(View source code)
Flow naming conventions
Readability of flow is very important. Agreeing on and following the same naming conventions will ease collaboration.
Default Value: [A-Za-z0-9]+_[A-Za-z0-9]+
Configuration example:
FlowName:
{
severity: 'error',
expression: '[A-Za-z0-9]'
}
Configuration ID: FlowName
(View source code)