-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Summer24 test 5 #399
base: master
Are you sure you want to change the base?
Summer24 test 5 #399
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review not passed
This is the summary of issues introduced by this change:
Policy name | Issues |
---|---|
Resilient | 13 |
Secure | 4 |
Composable | 0 |
Automated | 4 |
Engaging | 0 |
Reliable | 0 |
Intentional | 22 |
Compliant | 0 |
</value> | ||
</processMetadataValues> | ||
<processType>Workflow</processType> | ||
<recordUpdates> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated: Missing flow fault path
Severity
Warning
Finding
Step "evaluationType" of flow "Flow1" doesn't have a fault path to handle errors.
Why is this a problem?
Flows that interact with the Salesforce database can fail. As a best practice, all fault paths should cover by error handlers.
Help and documentation
@@ -0,0 +1,12 @@ | |||
public class ApexCdpQueryUsageExample { | |||
|
|||
public static void positive(List<Line_Item__c> items) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional: Unnecessary code
Severity
Warning
Finding
Method positive
is not necessary. Consider removing it.
Why is this a problem?
Removing unnecessary code makes your app cleaner, more efficient and easier to understand.
MyFirstRestAPIClass.doDelete(); | ||
|
||
List<Account> ListAcct = [SELECT Id FROM Account WHERE Id=:acc.id]; | ||
System.assert(ListAcct.size() ==0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional: Test assertion without a comment
Severity
Warning
Finding
This assertion does not include any comments. Please add a comment that describes rationale of the assertion.
Why is this a problem?
Assertions let you test the behaviour of your application, increasing your confidence that your logic works as expected. Adding precise assertions to your tests is one of the most effective ways to detect and correct bugs. Using comments to describe the rationale of each assertion has the added benefit of documenting the inner working of the application logic, enhancing maintainability.
Help and documentation
</value> | ||
</processMetadataValues> | ||
<processType>Workflow</processType> | ||
<recordUpdates> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Automated: Missing flow fault path
Severity
Warning
Finding
Step "evaluationType" of flow "Flow2" doesn't have a fault path to handle errors.
Why is this a problem?
Flows that interact with the Salesforce database can fail. As a best practice, all fault paths should cover by error handlers.
Help and documentation
@@ -0,0 +1,11 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secure: Usage of JavaScript in WebLinks
Severity
Warning
Finding
Usage of JavaScript in WebLinks
Why is this a problem?
JavaScript of any type is not allowed to run within the Salesforce.com application context. This includes JavaScript blocks within HomePageComponents, WebLinks, Custom buttons, and all other components run under the Salesforce DOM.
Help and documentation
@@ -0,0 +1,34 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional: Use of Workflows and Process Builders
Severity
Error
Finding
Workflows and Process Builders are retired.
Why is this a problem?
Workflows and Process Builders are retired and it’s recommended to transition to Flows.
Help and documentation
System.assert(strId !=null ); | ||
} | ||
|
||
static testMethod void testDeleteMethod(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resilient: Test method not annotated
Severity
Warning
Finding
The test method testDeleteMethod
is not annotated. Remove the testMethod
keyword and annotate with @IsTest
instead.
Why is this a problem?
Salesforce has deprecated the use of the testMethod keyword. Annotating test methods with @istest is the widely recommended approach.
Help and documentation
@@ -0,0 +1,607 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secure: Flow without access restrictions
Severity
Warning
Finding
This flow doesn't define any access restriction. Permissions to run certain flows should be defined either at the profile or at the permission set level.
Why is this a problem?
As a best practice, flows should be restricted to specific users. Omitting restrictions gives all users the possibility to invoke a flow, which is typically undesirable.
Help and documentation
|
||
} | ||
|
||
static testMethod void testPostMethod(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resilient: Test method not annotated
Severity
Warning
Finding
The test method testPostMethod
is not annotated. Remove the testMethod
keyword and annotate with @IsTest
instead.
Why is this a problem?
Salesforce has deprecated the use of the testMethod keyword. Annotating test methods with @istest is the widely recommended approach.
Help and documentation
} | ||
|
||
|
||
public static void negative(List<Line_Item__c> items) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentional: Unnecessary code
Severity
Warning
Finding
Method negative
is not necessary. Consider removing it.
Why is this a problem?
Removing unnecessary code makes your app cleaner, more efficient and easier to understand.
No description provided.