SonarQube:如何将多个质量配置文件应用于一个项目? [英] SonarQube: How to apply multiple quality profiles to one project?

查看:738
本文介绍了SonarQube:如何将多个质量配置文件应用于一个项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 SonarQube 6.3.1来分析的Java和Kotlin代码Android 项目.因此,除了预安装的 SonarJava 之外,我还安装了 Android Lint 插件. 声纳方式插件.两者都显示在项目的 Administration 部分的 Java 语言下拉列表中,如屏幕截图所示.

I would like to use SonarQube 6.3.1 to analyze the Java and Kotlin code of an Android project. Therefore, I installed the Android Lint plugin besides the preinstalled SonarJava aka. Sonar way plugin. Both show up in the Java language dropdown in the Administration section of the project as shown in the screenshot.

  • 如何同时应用多个个人资料?
  • 在哪里可以找到其他适合Java/Kotlin/Android项目的配置文件?
  • How can I apply multiple profiles at the same time?
  • Where can I find other profiles suitable for Java/Kotlin/Android projects?

推荐答案

您可以通过创建第三个配置文件来应用两个配置文件,该配置文件包含每个源配置文件中的所有规则.

You apply both profiles by creating a third profile that contains all the rules in each of your source profiles.

最简单的方法是

  1. 转到质量配置文件"并创建一个新的配置文件
  2. 现在,在配置文件列表中,单击一个源配置文件的规则计数.这会将您带到该配置文件中活动的规则列表
  3. 使用批量更改>启用... 选项在您的新个人资料中启用这些规则
  4. 返回到步骤2,列表中将包含下一个来源配置文件.
  1. Go to Quality Profiles and create a new profile
  2. Now in the list of profiles, click on the rule count for one of your source profiles. This takes you to the list of rules active in that profile
  3. Use the Bulk Change > Activate In... option to turn those rules on in your new profile
  4. Return to step 2 with the next source profile in your list.

这篇关于SonarQube:如何将多个质量配置文件应用于一个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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