SonarQube: How to suppress a warning in Kotlin cod

2020-08-26 03:40发布

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.

2条回答
ら.Afraid
2楼-- · 2020-08-26 04:24

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.

查看更多
forever°为你锁心
3楼-- · 2020-08-26 04:29

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.

查看更多
登录 后发表回答