SonarQube:如何在Kotlin代码中禁止显示警告

编程入门 行业动态 更新时间:2024-10-11 09:19:20
本文介绍了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代码中禁止显示警告

本文发布于:2023-11-09 07:42:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571766.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:代码   如何在   SonarQube   Kotlin

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!