Juergen Zimmermann
Juergen Zimmermann

Reputation: 2222

SonarQube: How to suppress a warning in Kotlin code

I'm using SQ 7.3-alpha1 with sonar-kotlin-plugin-1.0.1.965.jar. However, I cannot deactivate a special warning inside my Kotlin code for repositories in Spring Data where I need an "_" in a method name. I tried both //NOSONAR and @Suppress("kotlin:S100") and @SuppressWarnings("kotlin:S100"). Any hint is appreciated.

Upvotes: 10

Views: 4116

Answers (2)

Michiel Leegwater
Michiel Leegwater

Reputation: 1180

Great news, https://jira.sonarsource.com/browse/SONARSLANG-373 is fixed in version 1.6 of Sonarslang. So an update to that version might improve the situation. I’ve not tested it yet, hence the cautious wording.

Upvotes: 0

G. Ann - SonarSource Team
G. Ann - SonarSource Team

Reputation: 22804

You're not able to deactivate that issue because none of the mechanisms you're trying to use have been implemented for Kotlin.

Instead, you'll have to do this from the UI side.

Upvotes: 6

Related Questions