-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Salesforce use sf + default Flow Scanner rules (#3435)
* Salesforce use sf + default Flow Scanner rules * More use sf * Add second error file for Flows tests --------- Co-authored-by: nvuillam <[email protected]>
- Loading branch information
Showing
4 changed files
with
115 additions
and
17 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
...mation/test/salesforce-lfs/bad/force-app/main/default/flows/Unused_Variable.flow-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Flow xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>58.0</apiVersion> | ||
<description>This flow demonstrates a violation of the rule "Unused Variable".</description> | ||
<environments>Default</environments> | ||
<interviewLabel>Unused Variable {!$Flow.CurrentDateTime}</interviewLabel> | ||
<label>Unused Variable</label> | ||
<processMetadataValues> | ||
<name>BuilderType</name> | ||
<value> | ||
<stringValue>LightningFlowBuilder</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processMetadataValues> | ||
<name>CanvasMode</name> | ||
<value> | ||
<stringValue>AUTO_LAYOUT_CANVAS</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processMetadataValues> | ||
<name>OriginBuilderType</name> | ||
<value> | ||
<stringValue>LightningFlowBuilder</stringValue> | ||
</value> | ||
</processMetadataValues> | ||
<processType>Flow</processType> | ||
<screens> | ||
<name>mock_screen</name> | ||
<label>mock screen</label> | ||
<locationX>176</locationX> | ||
<locationY>134</locationY> | ||
<allowBack>true</allowBack> | ||
<allowFinish>true</allowFinish> | ||
<allowPause>true</allowPause> | ||
<showFooter>true</showFooter> | ||
<showHeader>true</showHeader> | ||
</screens> | ||
<start> | ||
<locationX>50</locationX> | ||
<locationY>0</locationY> | ||
<connector> | ||
<targetReference>mock_screen</targetReference> | ||
</connector> | ||
</start> | ||
<status>Active</status> | ||
<variables> | ||
<name>anUnusedVariable</name> | ||
<dataType>String</dataType> | ||
<isCollection>false</isCollection> | ||
<isInput>false</isInput> | ||
<isOutput>false</isOutput> | ||
<value> | ||
<stringValue>hello world</stringValue> | ||
</value> | ||
</variables> | ||
</Flow> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"rules": { | ||
"APIVersion": { | ||
"severity": "warning" | ||
}, | ||
"CopyAPIName": { | ||
"severity": "warning" | ||
}, | ||
"DMLStatementInLoop": { | ||
"severity": "error" | ||
}, | ||
"DuplicateDMLOperation": { | ||
"severity": "error" | ||
}, | ||
"FlowDescription": { | ||
"severity": "note" | ||
}, | ||
"FlowName": { | ||
"severity": "warning", | ||
"expression": "[A-Za-z0-9]+_(SCR|SFL|SCH|EVT|EML|BeforeCreate|BeforeUpdate|BeforeDelete|BeforeCreateBeforeUpdate|AfterCreate|AfterUpdate|AfterDelete|AfterCreateAfterUpdate)_[A-Za-z0-9]+" | ||
}, | ||
"HardcodedId": { | ||
"severity": "error" | ||
}, | ||
"MissingFaultPath": { | ||
"severity": "note" | ||
}, | ||
"MissingNullHandler": { | ||
"severity": "note" | ||
}, | ||
"SOQLQueryInLoop": { | ||
"severity": "error" | ||
}, | ||
"UnconnectedElement": { | ||
"severity": "error" | ||
}, | ||
"UnusedVariable": { | ||
"severity": "error" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters