Skip to content

Commit

Permalink
Modify rule S4423, S6378, S6387, S6656: Fix diff view errors in ARM e…
Browse files Browse the repository at this point in the history
…xamples (#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)
  • Loading branch information
egon-okerman-sonarsource authored Sep 13, 2023
1 parent 3075880 commit a9c9fb9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion rules/S6378/azureresourcemanager/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion rules/S6387/azureresourcemanager/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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#",
Expand Down
4 changes: 2 additions & 2 deletions rules/S6656/azureresourcemanager/how-to-fix-it/arm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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#",
Expand Down Expand Up @@ -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#",
Expand Down
4 changes: 2 additions & 2 deletions rules/S6656/azureresourcemanager/how-to-fix-it/bicep.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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' = {
Expand Down

0 comments on commit a9c9fb9

Please sign in to comment.