-
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
Recursion #383
base: master
Are you sure you want to change the base?
Recursion #383
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 change adds 3 new problems. See the full report
@@ -2,6 +2,30 @@ public class CandidateGradeController { | |||
public CandidateGradeController() { | |||
} | |||
|
|||
//Below method is a recursive method and should cause a warning. | |||
public static customer_Obj__c solveQueueRic(List<customer_Obj__c> COset,Integer index,customer_Obj__c head){ |
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.
Testing Best Practice: Untested method
Severity
Warning
Finding
Method solveQueueRic
is not tested. Please consider adding a test method to ensure it works as expected.
Why is this a problem?
Unit tests ensure that all code meets quality standards before it's deployed. Testing all your code is essential not only to meet Salesforce test coverage requirements but, more importantly, to make sure your logic keeps working as expected as your application evolves.
Help and documentation
if(index == 0){ | ||
lg = COset[index]; | ||
head = lg; | ||
return solveQueueRic(COset,index+1,head);//This is recursive call and clayton should flag it as warning. |
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.
Test Custom Policy Conga: Recursion method
Severity
Critical
Finding
Recursion method
Why is this a problem?
Recursion method
return head; | ||
} | ||
|
||
public static customer_Obj__c solveQueueRic(Integer index,customer_Obj__c head){ |
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.
Testing Best Practice: Untested method
Severity
Warning
Finding
Method solveQueueRic
is not tested. Please consider adding a test method to ensure it works as expected.
Why is this a problem?
Unit tests ensure that all code meets quality standards before it's deployed. Testing all your code is essential not only to meet Salesforce test coverage requirements but, more importantly, to make sure your logic keeps working as expected as your application evolves.
No description provided.