Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Recursion #383

wants to merge 1 commit into from

Conversation

Gabriele-Clayton
Copy link
Contributor

No description provided.

Copy link

@clayton-staging clayton-staging bot left a 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){

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.

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){

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant