Skip to content

Commit 9d6aebc

Browse files
authored
Merge pull request #73 from Force-Config-Control/outputstatusfix
Outputstatusfix
2 parents 327c13a + df0d896 commit 9d6aebc

File tree

3 files changed

+73
-5
lines changed

3 files changed

+73
-5
lines changed

CHANGELOG.md

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,80 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased] (beta, main branch content)
88

9-
- Markdown formatting
10-
- Add screenshot image at the head of the README
11-
- Fix rules table alignment
12-
- Add banner at the top of the README
9+
- Fix exit code that should be 1 according to --failon value [#71](https://github.com/Force-Config-Control/lightning-flow-scanner-sfdx/issues/71)
10+
11+
## [2.11.0] 2023-08
12+
13+
Fixes:
14+
15+
- [False positive 'FlowDescription' rule](https://github.com/Force-Config-Control/lightning-flow-scanner-core/issues/39)
16+
- [False positive 'MissingNullHandler' rule](https://github.com/Force-Config-Control/lightning-flow-scanner-core/issues/38)
17+
18+
## [2.9.0] 2023-08
19+
20+
- Bugfix folder scan & human output: some bugs have been fixed in 2.9 regarding including node modules in the scope of the scan and also the issues in the human output
21+
22+
## [2.8.0] 2023-08
23+
24+
New Rule: **Copy of API Name**
25+
26+
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.
27+
28+
Configuration ID: CopyOf ([View source code](https://github.com/Force-Config-Control/lightning-flow-scanner-core/tree/master/src/main/rules/CopyOf.ts))
29+
30+
## [2.5.0] 2023-07
31+
32+
Introducing two new configurable rules!
33+
34+
1. Old API Version
35+
2. Flow Naming Convention
36+
37+
### 1. Old API version
38+
39+
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.
40+
41+
Default Value: `>50.0`
42+
43+
Configuration example:
44+
```
45+
APIVersion:
46+
{
47+
severity: 'error',
48+
expression: '===58'
49+
}
50+
```
51+
52+
Configuration ID: `APIVersion` _([View source code](https://github.com/Force-Config-Control/lightning-flow-scanner-core/tree/master/src/main/rules/APIVersion.ts))_
53+
54+
### 2. Flow naming conventions
55+
56+
Readability of flow is very important. Agreeing on and following the same naming conventions will ease collaboration.
57+
58+
Default Value: `[A-Za-z0-9]+_[A-Za-z0-9]+`
59+
60+
Configuration example:
61+
```
62+
FlowName:
63+
{
64+
severity: 'error',
65+
expression: '[A-Za-z0-9]'
66+
}
67+
```
68+
69+
Configuration ID: `FlowName` _([View source code](https://github.com/Force-Config-Control/lightning-flow-scanner-core/tree/master/src/main/rules/FlowName.ts))_
70+
71+
## [2.3.0] - 2023-07
72+
73+
- DuplicateDMLOperations now also returns false when the navigation of the screen after a DML has been hidden completely and not just the previous navigational button.
1374

1475
## [2.1.0] - 2023-07-16
1576

1677
- Fix npm package generation (please do not use 2.0.0 but 2.1.0)
1778
- Upgrade lightning-flow-scanner-core dependency to 2.5.0
79+
- Markdown formatting
80+
- Add screenshot image at the head of the README
81+
- Fix rules table alignment
82+
- Add banner at the top of the README
1883

1984
## [2.0.0] - 2023-07-16
2085

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": "2.11.0",
3+
"version": "2.12.0",
44
"author": "Ruben",
55
"bugs": "https://github.com/Force-Config-Control/lightning-flow-scanner-sfdx/issues",
66
"dependencies": {

src/commands/flow/scan.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ export default class scan extends SfdxCommand {
220220
this.ux.styledHeader(message);
221221

222222
// Set status code = 1 if there are errors, that will make cli exit with code 1 when not in --json mode
223+
if (status > 0) {
224+
process.exitCode = status;
225+
}
223226
return { summary, status: status, results: errors };
224227
}
225228
// lightning flow scanner can be customized using a local config file .flow-scanner.yml

0 commit comments

Comments
 (0)