A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/5139 below:

false negative for triggers · Issue #5139 · pmd/pmd · GitHub

Affects PMD Version: 7.3.0

Rule: OperationWithHighCostInLoop

Description:
Violations for OperationWithHighCostInLoop no longer happen within triggers.

Code Sample demonstrating the issue:

trigger accountTrigger on Account (before insert, before update) {
		integer i = 0;
		for (i = 0; i <15; i++) {
			SObjectType token = Schema.getGlobalDescribe().get('Account');
		}
}

Expected outcome:
A violation for OperationWithHighCostInLoop should be thrown, the same way it was in 7.2.0.

Running PMD through: [CLI]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4