You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an ARM template with a nested template is referenced from a Bicep template as a module, any results from the nested ARM template will have incorrect line numbers.
Expected behavior
Template-Analyzer should be able to give correct line numbers for results in nested ARM templates that are referenced from Bicep templates.
Reproduction Steps
Create an ARM template that has a nested template, e.g. use one from tests like SimpleNestedFail.json.
Create a Bicep module that references the ARM template with a nested template, e.g.
In order to fix this issue, the tool will need to recreate a populated TemplateContext that reflects what JsonSourceLocationResolver would have when processing a nested template, complete with the JObjects of the extracted nested templates, etc. Will likely need to refactor the nested template processing code in AnalyzeAllIncludedTemplates in a shared class that TemplateAnalyzer and BicepLocationProcessor can used to process a nested ARM template.
Additionally, BicepLocationResolver needs to use a TemplateContext to match the context of the nested template, so there will need to be a way to determine what nested template is in scope from the JSON path as well before resolving the line number.
Describe the bug
When an ARM template with a nested template is referenced from a Bicep template as a module, any results from the nested ARM template will have incorrect line numbers.
Expected behavior
Template-Analyzer should be able to give correct line numbers for results in nested ARM templates that are referenced from Bicep templates.
Reproduction Steps
Environment
No response
The text was updated successfully, but these errors were encountered: