我们的 Android 项目依赖于一些我们无法控制的外部项目。因此,我正在尝试设置自定义 lint.xml 文件,以便我们可以为它们添加忽略规则。作为开始的场景,我试图从 ActionBarSherlock 中删除警告(杰克没有冒犯)
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="FloatMath">
<ignore path="app/target/classes/com/actionbarsherlock/*" />
</issue>
<issue id="DefaultLocale">
<ignore path="app/target/classes/com/actionbarsherlock/*" />
</issue>
<issue id="ViewConstructor">
<ignore path="app/target/classes/com/actionbarsherlock/*" />
</issue>
</lint>
使用以下命令
lint app --disable FloatMath,DefaultLocale,ViewConstructor --xml lint-result.xml
然而,生成的报告仍然包含来自 ABS 的消息。
更新 我将命令更改为
lint --disable FloatMath,DefaultLocale,ViewConstructor --xml lint-result.xml app
无论忽略什么,Jenkins 都不会做任何更改,仍然会产生相同的报告,但是如果在命令行中运行,它会忽略禁用后列出的所有问题。我希望有一种简单的说法,嘿以 Maven 的方式忽略/排除事物......