Skip to content

Commit 705b05c

Browse files
MarcusFellingMarcus Felling
andauthored
Linter doc updates (#2842)
* Add more examples for secure-parameter-default * correct parameter misspelling in linter rule doc * add environment function docs link Co-authored-by: Marcus Felling <[email protected]>
1 parent 4ffccbc commit 705b05c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/linter-rules/no-hardcoded-env-urls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Code**: no-hardcoded-env-urls
44

5-
**Description**: Do not hardcode environment URLs in your template. Instead, use the environment function to dynamically get these URLs during deployment. For a list of the URL hosts that are blocked, see the default list of DisallowedHosts in [`bicepconfig.json`](./src/Bicep.Core/Configuration/bicepconfig.json).
5+
**Description**: Do not hardcode environment URLs in your template. Instead, use the [environment function](https://docs.microsoft.com/azure/azure-resource-manager/templates/template-functions-deployment?tabs=json#environment) to dynamically get these URLs during deployment. For a list of the URL hosts that are blocked, see the default list of DisallowedHosts in [`bicepconfig.json`](./src/Bicep.Core/Configuration/bicepconfig.json).
66

77
The following example fails this test because the URL is hardcoded.
88

docs/linter-rules/secure-paramenter-default.md renamed to docs/linter-rules/secure-parameter-default.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ The following example fails this test:
1515
param adminPassword string = 'HardcodedPassword'
1616
```
1717

18-
The following example passes this test.
18+
The following examples pass this test:
1919

2020
```bicep
2121
@secure()
2222
param adminPassword string
2323
```
24+
25+
```bicep
26+
@secure()
27+
param adminPassword string = ''
28+
```
29+
30+
```bicep
31+
@secure()
32+
param adminPassword string = newGuid()
33+
```

0 commit comments

Comments
 (0)