Linter rule - simplify interpolation
This rule finds syntax that uses string interpolation when it isn't needed.
Linter rule code
Use the following value in the Bicep configuration file to customize rule settings:
simplify-interpolation
Solution
Remove any uses of string interpolation that isn't part of an expression to combine values.
The following example fails this test because it just references a parameter.
param AutomationAccountName string
resource AutomationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
name: '${AutomationAccountName}'
...
}
You can fix it by removing the string interpolation syntax.
param AutomationAccountName string
resource AutomationAccount 'Microsoft.Automation/automationAccounts@2022-08-08' = {
name: AutomationAccountName
...
}
Optionally, you can use Quick Fix to remove the string interpolation syntax:
Next steps
For more information about the linter, see Use Bicep linter.
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru