Bicep diagnostic code - BCP018

This diagnostic occurs when a character, such as a bracket, is missing.

Description

Expected the <character> character at this location.

Level

Error

Solution

Add the missing character.

Examples

The following example raises the diagnostic because the code is missing a }.

output tennisBall object = {
  type: 'tennis'
  color: 'yellow'

You can fix the diagnostic by adding the missing }.

output tennisBall object = {
  type: 'tennis'
  color: 'yellow'
}

For more information, see Objects

The following example raises the diagnostic because the code is missing a ].

output colors array = [
  'red'
  'blue'
  'white'

You can fix the diagnostic by adding the missing ].

output colors array = [
  'red'
  'blue'
  'white'
]

For more information, see Arrays.

The following example raises the diagnostic because the code is missing = and the assigned value.

output month int

You can fix the diagnostic by completing the output declaration.

output month int = 3

For more information, see Outputs.

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.