We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Affects PMD Version: 6.33+ 7.0.0
Description:
Currently the OperationWithLimitsInLoopRule rule verifies for some operations that count against Apex Governor Limits, but some of them are missing and therefore are not reported:
Instance methods 🚧 still to do
Http.send()
SObject.recalculateFormulas()
Messaging.PushNotification.send()
Static methods: ✔️ Note - these methods are already supported by #3198 with PMD 6.34.0
Approval.process()
Approval.lock()
Approval.unlock()
Messaging.sendEmail()
Messaging.renderEmailTemplate()
Messaging.renderStoredEmailTemplate()
System.enqueueJob()
System.runAs()
System.schedule()
System.scheduleBatch()
Other 🚧 still to do
Code Sample demonstrating the issue:
/** * @description X */ public with sharing class LoopLimits { /** * @description X */ public static void checkLimits() { Http h = new Http(); Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest(); Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); Messaging.PushNotification msg = new Messaging.PushNotification(); for (Integer i = 0; i < 10; i++) { h.send(new HttpRequest()); Eventbus.publish(new Account__e()); //check only required for publish immediately events Approval.process(req); Approval.lock(new Account()); Approval.unlock(new Account()); Messaging.sendEmail(new Messaging.SingleEmailMessage[]{email}); Messaging.renderEmailTemplate(null, null, null); Messaging.renderStoredEmailTemplate(null, null, null); new Contact().recalculateFormulas(); System.enqueueJob(new MyQueueable()); System.runAs(new User()) { System.debug(LoggingLevel.DEBUG, 'x'); } System.schedule('x', '0 0 0 1 1 ?', new MySchedule()); System.scheduleBatch(new MyBatch(), 'x', 1); msg.send('x', null); ConnectApi.Comment comment = ConnectApi.ChatterFeeds.getComment(null, null); } } }
Steps to reproduce:
Please provide detailed steps for how we can reproduce the bug.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Affects PMD Version:
6.33+
7.0.0
Description:
Currently the OperationWithLimitsInLoopRule rule verifies for some operations that count against Apex Governor Limits, but some of them are missing and therefore are not reported:
Instance methods 🚧 still to do
Http.send()
SObject.recalculateFormulas()
Messaging.PushNotification.send()
Static methods: ✔️ Note - these methods are already supported by #3198 with PMD 6.34.0
Approval.process()
,Approval.lock()
,Approval.unlock()
Messaging.sendEmail()
,Messaging.renderEmailTemplate()
,Messaging.renderStoredEmailTemplate()
System.enqueueJob()
,System.runAs()
,System.schedule()
,System.scheduleBatch()
Other 🚧 still to do
Code Sample demonstrating the issue:
Steps to reproduce:
Please provide detailed steps for how we can reproduce the bug.
The text was updated successfully, but these errors were encountered: