Linter 규칙 - 충돌하는 메타데이터 없음

템플릿 작성자가 다른 데코레이터와 충돌하는 속성이 있는 @metadata() 데코레이터를 제공하면 이 linter 규칙이 경고를 발생합니다.

Linter 규칙 코드

Bicep 구성 파일의 다음 값을 사용하여 규칙 설정을 사용자 지정합니다.

no-conflicting-metadata

솔루션

@metadata() 데코레이터의 description 속성이 @description() 데코레이터와 충돌하기 때문에 다음 예제에서는 이 테스트가 실패합니다.

@metadata({
  description: 'I conflict with the @description() decorator and will be overwritten.' // <-- will trigger a no-conflicting-metadata diagnostic
})
@description('I am more specific than the @metadata() decorator and will overwrite any 'description' property specified within it.')
param foo string

@description() 데코레이터는 항상 @metadata() 데코레이터의 모든 항목보다 우선합니다. 따라서 linter 규칙은 @metadata() 값 내의 description 속성이 중복되어 대체될 것임을 알려줍니다.

다음 단계

Linter에 관한 자세한 내용은 Bicep Linter 사용을 참조하세요.