인식되지 않는 진단 코드

인식되지 않는 진단 코드

analysis_options.yaml 파일의 analyzer/errors 섹션에 존재하지 않는 진단(diagnostic) 코드를 지정하면 이 진단이 발생해요. 올바른 진단 이름을 쓰는 방법을 함께 살펴볼게요.

출처: unrecognized_error_code

본문

설명

analyzer는 분석 옵션 파일의 analyzer/errors 섹션에 유효하지 않은 진단 코드가 들어 있을 때 이 진단을 내보내요.

예시

다음 코드는 진단 implementation_import가 정의되어 있지 않기 때문에 진단이 발생해요.

// %uri="analysis_options.yaml"
analyzer:
  errors:
    annotate_overrides: error
    implementation_import: warning

일반적인 해결 방법

지정하려는 진단의 이름이 다르다면 이름을 올바른 값으로 바꿔줘요.

// %uri="analysis_options.yaml"
analyzer:
  errors:
    annotate_overrides: error
    implementation_imports: warning

해당하는 진단이 없다면 이름을 제거해요.

// %uri="analysis_options.yaml"
analyzer:
  errors:
    annotate_overrides: error

더 알아보기