gpt4 book ai didi

android - 使 SonarQube(Android Lint 配置文件)使用项目的 lint.xml

转载 作者:太空狗 更新时间:2023-10-29 16:38:17 25 4
gpt4 key购买 nike

我用 SonarQube(Android Lint 配置文件)分析了我的 Android 项目。
默认情况下,Lint 将缺少的翻译显示为严重,但我认为它们是一个小问题。

所以我在项目的主目录中编写了这个 lint.xml 文件(与 sonar-properties.xml 相同的文件夹):

<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="MissingTranslation">
<ignore path="res/values/constants.xml" />
</issue>
</lint>

不幸的是,SonarQube 似乎没有考虑到这个文件。
如何让 SonarQube 使用我的 lint.xml

最佳答案

与在 SonarQube 中提供规则的每个语言插件一样,您应该 customize those rules (严重性、参数)您在 SonarQube 本身中的质量配置文件 - 而不是在属于您的项目的文件中。

因此,在您的情况下,您必须查看用于项目的质量概况,找到导致翻译缺失问题的规则,并将其严重性更改为轻微。

关于android - 使 SonarQube(Android Lint 配置文件)使用项目的 lint.xml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22851561/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com