运行AS检查和Gradle Lint时获得(几乎)相同的结果 [英] Getting (almost) the same results when running AS inspections and gradle Lint

查看:245
本文介绍了运行AS检查和Gradle Lint时获得(几乎)相同的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有类似的问题比这一个。我想从Android Studio和控制台Gradle任务运行代码检查时获得相同的结果(尽可能多)。
当从AS运行时,我使用一个xml Profile来定义一些检查工具,例如:

I have a similar issue than this one. I want to get the same results (as much as possible) when running code inspections from Android Studio and from a console Gradle task. When running from AS, I am using an xml Profile that defines some inspection tools, e.g:

<inspection_tool class="AndroidLintContentDescription" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AndroidLintHardcodedText" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="AndroidLintRegistered" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="AnonymousClassComplexity" enabled="true" level="WARNING" enabled_by_default="true">

我在AS和控制台的结果上有很大差异(ASAndroid Lint与控制台中的38个项目相比)。
如何从控制台运行Lint时加载此配置文件?这是可能的吗?

I am having big differences in results from AS and console (78 items in AS "Android Lint" section vs. 38 items in the console). How can I load this Profile when running Lint from console? Is this even possible?

问候

推荐答案

这篇关于运行AS检查和Gradle Lint时获得(几乎)相同的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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