Bicep invalid warning

  • What language is this for: Bicep

  • Which rule: azureresourcemanager:S1192

  • Why do you believe it’s a false-positive:
    It is false positive since it is not valid bicep it recommend.

  • Are you using: SonarCloud

  • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots) :
    Main.bicep:

module moduleName_one 'dosomething.bicep' = {
  name: 'deployName_one'
  params: {
    argument: 'test1'
  }
}
module moduleName_two 'dosomething.bicep' = {
  name: 'deployName_two'
  params: {
    argument: 'test2'
  }
}
module moduleName_tree 'dosomething.bicep' = {
  name: 'deployName_tree'
  params: {
    argument: 'test3'
  }
}
module moduleName_four 'dosomething.bicep' = {
  name: 'deployName_four'
  params: {
    argument: 'test4'
  }
}
module moduleName_five 'dosomething.bicep' = {
  name: 'deployName_five'
  params: {
    argument: 'test5'
  }
}

dosomething.bicep

param argument string
output result string = argument

The rule want to replace the path to bicep module with a variable but it is not valid.
So you need to add path to execptions just like you have done with schema and api versions

Hello @HenrikSommer-eng!

Thanks for your report and a clear reproducer! Indeed, your suggestion makes sense. I created a ticket, and you can keep track of the progress there.

Best,

Peter