CheckStyle Unable to create a Checker:configLocation 문제
CheckStyle Unable to create a Checker:configLocation 문제
최근에는 안드로이드 스튜디오 3.0 버전을 사용하면서 그레이드 버전을 3.3에서 3.5 버전으로 업그레이드했다.
원래 프로젝트에서 정적 코드 분석 도구인 CheckStyle을 사용할 수 없는 것을 갑자기 발견했습니다. 다음과 같은 오류가 발생했습니다.1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkstyle'.
> Unable to create Root Module: configLocation {xxxx/xxxx/checkstyle/checkstyle.xml}, classpath {null}.
자료를 찾아보니 대체로 이렇다.Gradle3.5 릴리즈에서는 기본적으로 CheckStyle7.2 버전, 3.3 버전에서 5.9 버전을 사용하고 호환성 오류가 있습니다.
원문은 다음과 같다.The specific problem here is that OperatorWrap did not support the METHOD_REF token until Checkstyle 7.2. Technically this configuration file is invalid unless you specify Checkstyle version 7.2 or higher.
With Gradle 3.3 (default Checkstyle 5.9), that configuration was still not correct, but you did not receive an error due to looser validation (in Checkstyle, not Gradle). That version only failed on tokens that were completely unknown, not those that were only valid for other rules.
그래서 공식적으로 해결 방안이 없는 경우Gradle에서 체크스타일 버전을 지정할 수 있다.
아래와 같다apply plugin: 'checkstyle'
checkstyle {
toolVersion = '5.9'
}
task checkstyle(type: Checkstyle) {
configFile file("checkstyle.xml")
ignoreFailures false
showViolations true
source 'src'
include '**/*.java'
exclude '**/gen/**', '**/test/**', '**/build/**'
classpath = files()
}
공식 주소
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSON
JSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다.
그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다.
저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkstyle'.
> Unable to create Root Module: configLocation {xxxx/xxxx/checkstyle/checkstyle.xml}, classpath {null}.
The specific problem here is that OperatorWrap did not support the METHOD_REF token until Checkstyle 7.2. Technically this configuration file is invalid unless you specify Checkstyle version 7.2 or higher.
With Gradle 3.3 (default Checkstyle 5.9), that configuration was still not correct, but you did not receive an error due to looser validation (in Checkstyle, not Gradle). That version only failed on tokens that were completely unknown, not those that were only valid for other rules.
apply plugin: 'checkstyle'
checkstyle {
toolVersion = '5.9'
}
task checkstyle(type: Checkstyle) {
configFile file("checkstyle.xml")
ignoreFailures false
showViolations true
source 'src'
include '**/*.java'
exclude '**/gen/**', '**/test/**', '**/build/**'
classpath = files()
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.