Supress Scala Rule on Specific Code Block

Since scala support on SonarQube/Cloud doesn’t work with the java annotation @SupressWarnings, is there an equalivalent for scala that would allow me to supress a particular rule on a particular class/object/function?

A great example case is scala:S117 (Local variable and function parameter names should comply with a naming convention), which is great most of the time, but sometimes I need case classes to correspond with external APIs which use underscore in their variable names, and it’s annoying to go through Sonarcloud/Sonarqube and individually mark each line as Wont’ fix.

Hi,

You’re looking for the ability to Ignore issues on Multiple Criteria. With this type of exclusion you can target rule key and file path.

 
HTH,
Ann