Modify rule S4423, S6378, S6387, S6656: Fix diff view errors in ARM examples (#3067)

## Review

A dedicated reviewer checked the rule description successfully for:

- [x] logical errors and incorrect information
- [x] information gaps and missing content
- [x] text style and tone
- [x] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
This commit is contained in:
Egon Okerman 2023-09-13 17:48:09 +02:00 committed by GitHub
parent 3075880d75
commit a9c9fb99ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View File

@ -25,7 +25,7 @@ On Storage Accounts, TLS 1.0 and 1.1 are accepted by default.
}
----
[source,bicep,diff-id=1,diff-type=noncompliant]
[source,bicep,diff-id=4,diff-type=noncompliant]
----
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: 'example'
@ -55,7 +55,7 @@ resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
}
----
[source,bicep,diff-id=1,diff-type=compliant]
[source,bicep,diff-id=4,diff-type=compliant]
----
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
name: 'example'

View File

@ -57,7 +57,7 @@ Using ARM templates:
Using Bicep:
[source,json,diff-id=2,diff-type=noncompliant]
[source,bicep,diff-id=2,diff-type=compliant]
----
resource sensitiveApiManagementService 'Microsoft.ApiManagement/service@2022-09-01-preview' = {
name: 'apiManagementService'

View File

@ -42,7 +42,7 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
}
----
[source,json,diff-id=2,diff-type=noncompliant]
[source,json,diff-id=2,diff-type=compliant]
----
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",

View File

@ -5,7 +5,7 @@ By setting `properties.expressionEvaluationOptions.scope` to `Inner` in the pare
=== Code examples
==== Noncompliant code example
[source,json,diff-id=1,diff-type=noncompliant]
[source,json,diff-id=101,diff-type=noncompliant]
----
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
@ -47,7 +47,7 @@ By setting `properties.expressionEvaluationOptions.scope` to `Inner` in the pare
==== Compliant solution
[source,json,diff-id=1,diff-type=compliant]
[source,json,diff-id=101,diff-type=compliant]
----
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",

View File

@ -7,7 +7,7 @@ If it is not possible to use modules, this issue can be fixed by setting `proper
=== Code examples
==== Noncompliant code example
[source,bicep,diff-id=1,diff-type=noncompliant]
[source,bicep,diff-id=201,diff-type=noncompliant]
----
@secure()
param adminUsername string = newGuid()
@ -39,7 +39,7 @@ resource example 'Microsoft.Resources/deployments@2022-09-01' = {
==== Compliant solution
[source,bicep,diff-id=1,diff-type=compliant]
[source,bicep,diff-id=201,diff-type=compliant]
----
// main.bicep
module example 'vm.bicep' = {