Parse error in Bicep file

Must-share information (formatted with Markdown):

  • which versions are you using SonarScanner 4.8.1.3023
  • how is SonarQube deployed: Azure devops pipeline
  • what are you trying to achieve Scan a bicep file
  • what have you tried so far to achieve this SonarScanner gives error but runs successful

I have changed a bicep file to make use of the single line object declaration but the scanner gives an error on this:

ERROR: Cannot parse 'Infrastructure.bicep:18:1'

This is line 17 and 18:

var toConnect = concat([
  { name: 'web', network: cidrSubnet(networkAddress, 24, subnets.WebServers) }

Even though I get an error, the scanner continues and reports a success. Because of this, the pipeline doesn’t stop but continues. The SonarQube site doesn’t show a warning or notification that there was an issue in the latest scan.

Hey there.

What version of SonarQube are you using? This should be found in the footer of your SonarQube instance.

Hello Colin,

We are using the Developer Edition, Version 10.3 (build 82913)

Thanks! Can you provide a full, valid Bicep file that reproduces the issue?