We are using Azure Devops pipelines to analyse our code:
- task: SonarCloudPrepare@2
inputs:
SonarCloud: 'SonarCloud'
organization: '<ORG>'
scannerMode: 'MSBuild'
projectKey: '<PROJECT>'
extraProperties: sonar.verbose=true
- task: SonarCloudAnalyze@2
- task: SonarCloudPublish@2
inputs:
pollingTimeoutSec: '300'
During scanning I see the following error:
14:38:04.296 ERROR: Cannot parse 'Common.Infrastructure/Common/Database.json'
SonarCloudAnalyze
The pattern I have been able to find is that this is because of /* comments */ in the json file. This is an Azure Resource Management template which allows to add these comments and I would like to have them there, because they explains some oddities in the template. The ARM template s also work fine on Azure deployment, so Azure Deployment doesn’t mind these comments.
Example:
"netFrameworkVersion": "v8.0",
"vnetName": "[variables('vnetName')]"
},
/* Workaround: as the hostNameBindings copy loop doesn't allow empty array */
"dummyHostNameBinding": [
{
"Domain": "[concat(parameters('websiteName'), '.azurewebsites.net')]",
"Thumbprint": "[json('null')]"
}
],
I would propose to support the ability to have comments in the json file. Is this a possibility?