A RetroSearch Logo

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

Search Query:

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

[apex] ApexCRUDViolation doesn't report SOQL for loops · Issue #3329 · pmd/pmd · GitHub

Affects PMD Version:
5.5.3 - 6.35.0

Rule:
ApexCRUDViolation

Description:

When using SOQL For loops the CRUD check seems to be not enforced

Code Sample demonstrating the issue:

// won't report it
for (Account acc : [SELECT Id FROM Account]) {
  //whatever
}

// will report it
Account[] accs = [SELECT Id FROM Account];

Expected outcome:

PMD should report a violation at line 1, but doesn't. This is a false-negative.

Running PMD through: Apex PMD VSCode Plugin


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