Affects PMD Version:
all
Rules:
Description:
With the Winter 23' release, a new class can be used to perform assertion in test class.
We have to add the new methods to existing rule to avoid false positive when this class will be used.
Apex class Assert
Code Sample demonstrating the issue:
@isTest public with sharing class Test { @isTest public static void testAssert(){ String sub = 'abcde'.substring(2); Assert.areEqual('cde', sub, 'Expected characters after first two'); } }
Expected outcome:
PMD reports a violation at line ..., but that's wrong. That's a false positive.
Running PMD through: [VS Code]
hassanalamibmx, HerbertHBT, firatesmer and schmalli
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