SonarQube Enterprise Edition
Version 9.6 (build 59041)
We are developing in Apex. There are some parts in our code for which we want to surpress the warnings. We have used the @SuppressWarnings
annotation, but without any effects.
Some of our code snippets
@SuppressWarnings('PMD.OperationWithLimitsInLoop')
private void doUpdate() {
for (SObjectType type : this.types) {
// update DML statement
}
}
We also tried the following without any effect
@SuppressWarnings('apex:S5382')
We have also tried putting the @SupressWarnings
annotation in the code block, before the function definition, nothing really seems to work.
Every time we are getting the following issue warning:
Move this DML statement out of the loop or process sObjects by batch.
Help is much appreciated.