Skip to content

Commit 4913646

Browse files
authored
Merge pull request #216771 from mumian/1101-decompiler-cleanup
New linter rule for decompiler cleanup
2 parents e37d2ce + 0e744c4 commit 4913646

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

articles/azure-resource-manager/bicep/bicep-config-linter.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Linter settings for Bicep config
33
description: Describes how to customize configuration values for the Bicep linter
44
ms.topic: conceptual
5-
ms.date: 09/30/2022
5+
ms.date: 11/01/2022
66
---
77

88
# Add linter settings in the Bicep config file
@@ -29,6 +29,9 @@ The following example shows the rules that are available for configuration.
2929
"artifacts-parameters": {
3030
"level": "warning"
3131
},
32+
"decompiler-cleanup": {
33+
"level": "warning"
34+
},
3235
"max-outputs": {
3336
"level": "warning"
3437
},
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Linter rule - decompiler cleanup
3+
description: Linter rule - decompiler cleanup
4+
ms.topic: conceptual
5+
ms.date: 11/01/2022
6+
---
7+
8+
# Linter rule - decompiler cleanup
9+
10+
The [Bicep CLI decompile](./bicep-cli.md#decompile) command converts ARM template JSON to a Bicep file. If a variable name, or a parameter name, or a resource symbolic name is ambiguous, the Bicep CLI adds a suffix to the name, for example *accountName_var* or *virtualNetwork_resource*. This rule finds these names in Bicep files.
11+
12+
## Linter rule code
13+
14+
Use the following value in the [Bicep configuration file](bicep-config-linter.md) to customize rule settings:
15+
16+
`decompiler-cleanup`
17+
18+
## Solution
19+
20+
To increase the readability, update these names with more meaningful names.
21+
22+
## Next steps
23+
24+
For more information about the linter, see [Use Bicep linter](./linter.md).

articles/azure-resource-manager/bicep/linter.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Use Bicep linter
33
description: Learn how to use Bicep linter.
44
ms.topic: conceptual
5-
ms.date: 9/30/2022
5+
ms.date: 11/01/2022
66
---
77

88
# Use Bicep linter
@@ -19,6 +19,7 @@ The default set of linter rules is minimal and taken from [arm-ttk test cases](.
1919

2020
- [adminusername-should-not-be-literal](./linter-rule-admin-username-should-not-be-literal.md)
2121
- [artifacts-parameters](./linter-rule-artifacts-parameters.md)
22+
- [decompiler-cleanup](./linter-rule-decompiler-cleanup.md)
2223
- [max-outputs](./linter-rule-max-outputs.md)
2324
- [max-params](./linter-rule-max-parameters.md)
2425
- [max-resources](./linter-rule-max-resources.md)

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@
392392
href: linter-rule-admin-username-should-not-be-literal.md
393393
- name: Artifacts parameters
394394
href: linter-rule-artifacts-parameters.md
395+
- name: Decompiler cleanup
396+
href: linter-rule-decompiler-cleanup.md
395397
- name: Max outputs
396398
href: linter-rule-max-outputs.md
397399
- name: Max parameters

0 commit comments

Comments
 (0)