콘텐츠로 이동

진단

Biome의 진단은 정보가 풍부하며, 일반적으로 오류를 이해하고 해결하기 위해 필요한 모든 정보를 제공합니다.

진단은 오류 탐지 외에도 구조화된 정보, 경고 및 조언을 제공하는 데도 사용됩니다.

이 페이지에서는 진단에 포함될 수 있는 모든 정보의 세부 사항을 설명합니다. 진단의 각 구성 요소를 이해하면 중요한 부분과 숨겨진 “비밀”을 식별하는 데 도움이 됩니다.

진단의 중대성은 CLI에 영향을 줄 수 있습니다. 예를 들어, 오류 진단은 CLI가 오류 코드로 종료되도록 유도할 수 있습니다.

치명적인 진단은 빨간색 텍스트로 표시됩니다. 일반적으로 Biome 내에서 예기치 않은 오류가 발생했을 때 생성됩니다. 오류와 비교해 보면, 이는 치명적 레이블을 가집니다.


 FATAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
   Biome exited as this error could not be handled and resulted in a fatal error. Please report it if necessary.
  

오류 진단은 빨간색 텍스트로 표시됩니다. 보통 문제를 해결해야 하며, CLI에서 발견되면 오류 코드를 반환합니다.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

경고 진단은 노란색 텍스트로 표시됩니다. 일반적으로 처리되어야 하는 항목입니다. 경고는 차단이 아니며, CLI의 작동을 방해하지 않습니다.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

정보 진단은 녹색 텍스트로 표시됩니다. 유용한 정보를 제공하며, CLI를 차단할 목적은 없습니다.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

레이블은 진단에 부착된 메타데이터로 간주할 수 있으며, 다양한 방식으로 클라이언트에 영향을 줄 수 있습니다.

자세한 진단은 일반적으로 숨겨져 있습니다. CLI를 통해 --verbose 옵션을 사용하여 이러한 진단을 표시할 수 있습니다.


 VERBOSE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

내부 진단은 내부 오류가 발생했을 때 생성됩니다. 일반적으로 사용자가 내부 오류를 보고하도록 권장됩니다.


 INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
   This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.
  

수정 가능한 진단은 사용자가 수정할 수 있는 특정 상황에서 생성됩니다. 일반적으로 코드 조작 액션을 가진 헤어스타일 진단에 사용됩니다.


 FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

폐기된 코드를 포함한 진단


 DEPRECATED  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

카테고리는 진단 그룹화에 사용됩니다. 카테고리는 선택적으로 링크를 가질 수 있으며, 예를 들어 lint 규칙에 속하는 카테고리인 경우 다음과 같이 링크를 포함할 수 있습니다.

이 진단은 “check”라는 카테고리에 속합니다. 즉, check 명령을 실행할 때 생성됩니다.


check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

이 진단은 “lint/a11y/noAccessKey” 카테고리에 속합니다. 링크를 따라가면 noAccessKey 린트 규칙의 웹페이지로 이동합니다.


lint/a11y/noAccessKey ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

진단에는 “위치” 정보가 있을 수 있습니다. 위치는 다음 세 가지 선택적 구성 요소로 구성됩니다:

  • 리소스: 진단을 생성한 원본;
  • 파일의 소스 코드;
  • 스팬(또는 텍스트 범위), 일반적으로 파일 내의 .

파일 경로는 일반적으로 진단의 최상단 왼쪽에 처음 나타나는 정보입니다.


path/to/file.js ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  

이것은 파일에 연결된 소스 코드가 어떻게 표시되는지를 보여줍니다. 줄 번호와 열 번호는 표시되지 않음을 주의하세요.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
  > 1 │ Some source code
        ^^^^^
  

(Line)과 (Column)은 보통 파일 경로 옆에 함께 출력되며, 관련된 소스 코드가 있을 때만 표시됩니다.


path/to/file.txt:1:6 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
  > 1 │ Some source code
        ^^^^^^
  

IDE의 터미널 내에서 진단을 출력할 경우, ruta/al/archivo.js:2:2를 클릭하면 해당 파일이 열리고 커서가 해당 범위의 시작 지점에 위치합니다.


path/to/file.js:2:2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
    1 │ function name() {
  > 2 │ 	return 'lorem'
   	^^^^^^^^^^^^^^
    3 │ }
  

또한, 우리의 진단은 조언을 저장할 수 있습니다. 조언은 원래 메시지에 추가되는 추가적인 메시지입니다.

이러한 조언은 다양한 유형과 형태를 가질 수 있습니다. 일반적으로 조언은 항상 출력되며, _세부 설명 조언_을 제외하고는 말입니다.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   This is the message of the diagnostic. It will appear in different colours based on the severity of the diagnostic.
  
   This log is an error.
  
   This log is a warning
  
   This log is an information
  
  This log doesn't have any category. Below, you'll have a command
  
  $ biome command
  
  Below, a group.
  
  I am a group
  
     First message of a group.
    
     Second message of a group.
    
  Below, a list.
  
  - First item
  - Second item
  
  Below, a diff.
  
  - Old·code
  + New·code
  
  Below, a code frame.
  
  > 1 │ Lorem
   ^^^
    2 │ Ipsum