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
description: Linter rule - no unnecessary dependsOn entries
4
4
ms.topic: reference
5
5
ms.custom: devx-track-bicep
6
-
ms.date: 07/11/2024
6
+
ms.date: 10/11/2024
7
7
---
8
8
9
9
# Linter rule - no unnecessary dependsOn entries
@@ -18,7 +18,7 @@ Use the following value in the [Bicep configuration file](bicep-config-linter.md
18
18
19
19
## Solution
20
20
21
-
To reduce confusion in your template, delete any dependsOn entries that aren't necessary. Bicep automatically infers most resource dependencies as long as template expressions reference other resources via symbolic names rather than strings with hard-coded IDs or names.
21
+
To reduce confusion in your template, delete any dependsOn entries that aren't necessary. Bicep automatically infers most resource dependencies as long as template expressions reference other resources via symbolic names rather than strings with hard-coded IDs or names.
22
22
23
23
The following example fails this test because the dependsOn entry `appServicePlan` is automatically inferred by Bicep implied by the expression `appServicePlan.id` (which references resource symbolic name `appServicePlan`) in the `serverFarmId` property's value.
Use **Quick Fix** to remove the unnecessary dependsOn entry.
72
+
Use **Quick Fix** to remove the unnecessary dependsOn entry:
73
73
74
-
:::image type="content" source="./media/linter-rule-no-unnecessary-dependson/linter-rule-no-unnecessary-dependson-quick-fix.png" alt-text="The screenshot of No unnecessary dependson linter rule with quick fix.":::
74
+
:::image type="content" source="./media/linter-rule-no-unnecessary-dependson/linter-rule-no-unnecessary-dependson-quick-fix.png" alt-text="A screenshot of using Quick Fix for the no-unnecessary-dependson linter rule.":::
0 commit comments