SonarQube:如何在Kotlin代码中禁止显示警告 [英] SonarQube: How to suppress a warning in Kotlin code

查看:246
本文介绍了SonarQube:如何在Kotlin代码中禁止显示警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将SQ 7.3-alpha1与sonar-kotlin-plugin-1.0.1.965.jar一起使用.但是,我无法在Spring数据存储库的Kotlin代码中停用特殊警告,该方法需要在方法名称中添加"_". 我同时尝试了//NOSONAR@Suppress("kotlin:S100")@SuppressWarnings("kotlin:S100").任何提示表示赞赏.

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.

推荐答案

您无法停用该问题,因为您尝试使用的机制均未针对Kotlin实施.

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

相反,您必须从UI端执行此操作.

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

这篇关于SonarQube:如何在Kotlin代码中禁止显示警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆