Must-share information (formatted with Markdown):
- which versions are you using SonarScanner CLI 6.1.0.4477
- 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
We have started the use of importing a user defined function. Now the SonarScanner gives an error on the line where whe import that function, like in the following script:
import { resourcePrefix } from '../sharedFunctions.bicep'
@description('The location to deploy the resources in.')
param location string = resourceGroup().location
@description('The prefix to use for all the resources.')
param resourceName string = resourceGroup().name
var prefixName = resourcePrefix(resourceName)
resource nsg 'Microsoft.Network/networkSecurityGroups@2022-11-01' = {
name: '${prefixName}-nsg'
location: location
}
This gives the following error:
ERROR Cannot parse 'infrastructure/id.bicep:1:1'
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 (self hosted) doesn’t show a warning or notification that there was an issue in the latest scan