2014-10-06 2 views
1

비슷한 문제가 있습니다. than this one. Android Studio 및 콘솔 Gradle 작업에서 코드 검사를 실행할 때 가능한 한 동일한 결과를 얻고 싶습니다. AS에서 실행하는 경우 , 내가 예를 들어, 일부 검사 도구를 정의하는 XML 프로필, 사용하고 있습니다 : 나는 AS 및 콘솔의 결과에 큰 차이 (AS 78 개 항목을 데AS 검사와 Lint를 실행할 때 거의 동일한 결과가 나타납니다.

<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"> 

을 "안드로이드 린트"섹션 대 38 개의 콘솔 항목). 콘솔에서 Lint를 실행할 때 어떻게이 프로파일을로드 할 수 있습니까? 이것은 가능한가?

감사

답변

0

안드로이드 린트는 안드로이드 스튜디오/인 IntelliJ에서 실행할 수있는 검사의 하위 집합입니다. 두 가지 모두에서 동일한 결과를 얻으려면 Android Studio에서 Android-Lint 이외의 검사를 사용 중지해야합니다.

+0

감사합니다 스콧. 따라서 내 프로필에 정의 된 모든 검사를 * 받으려면 Android Studio에서 실행해야합니다. – jmm

+0

맞습니다. –

3

당신은 명령 줄에서 안드로이드 스튜디오 검사를 실행할 수 있습니다

<android studio path>/bin/inspect.sh 

https://www.jetbrains.com/idea/help/running-inspections-offline.html

+0

Windows 8.1에서 Android Studio 1.3.2를 실행 중이므로 해당 셸 파일이 표시되지 않습니다. 어쨌든 Windows에서 sh 스크립트를 실행하는 것이 이상합니다. – jmm

+0

windows에서 inspect.bat 여야합니다. https://www.jetbrains.com/idea/help/running-inspections-offline.html을 참조하십시오. – Robert

관련 문제