Compare commits

...

5 Commits

Author SHA1 Message Date
Martin Strecker
1c6e806863 Restructure and rename files 2024-05-03 14:45:15 +02:00
Martin Strecker
a9c501a9a8 Fix messed up example 3 2024-05-03 14:45:15 +02:00
Martin Strecker
d428dbc8d3 Path separator 2024-05-03 14:45:14 +02:00
Martin Strecker
84e0491d05 Add VB 2024-05-03 14:45:08 +02:00
martin-strecker-sonarsource
c961a602cd Create rule S6673 2024-05-03 14:43:19 +02:00
10 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,4 @@
[source,vbnet,diff-id=1,diff-type=compliant]
----
logger.LogError("{First} placeholder and {Second} one.", first, second)
----

View File

@ -0,0 +1,6 @@
[source,vbnet,diff-id=1,diff-type=noncompliant]
----
' 'first' and 'second' are swapped
logger.LogError("{First} placeholder and {Second} one.", second, first)
' ^^^^^^ ^^^^^
----

View File

@ -0,0 +1,4 @@
[source,vbnet,diff-id=2,diff-type=compliant]
----
logger.LogError("File {FileName} not found in folder {Path}", fileName, path)
----

View File

@ -0,0 +1,5 @@
[source,vbnet,diff-id=2,diff-type=noncompliant]
----
logger.LogError("File {FileName} not found in folder {Path}", path, fileName)
' ^^^^ ^^^^^^^^
----

View File

@ -0,0 +1,4 @@
[source,vbnet,diff-id=3,diff-type=compliant]
----
logger.LogError("File {Name} not found in folder {DirectoryName}", file.Name, file.DirectoryName)
----

View File

@ -0,0 +1,6 @@
[source,vbnet,diff-id=3,diff-type=noncompliant]
----
logger.LogError("File {Name} not found in folder {Folder}", file.DirectoryName, file.Name)
' ^^^^
----

View File

@ -0,0 +1,6 @@
[source,vbnet,diff-id=4,diff-type=compliant]
----
Dim sum = x + y
Dim product = x * y
logger.LogError("Sum is {Sum} and product is {Product}", sum, product)
----

View File

@ -0,0 +1,4 @@
[source,vbnet,diff-id=4,diff-type=noncompliant]
----
logger.LogError("Sum is {Sum} and product is {Product}", x * y, x + y) ' Not detected
----

View File

@ -0,0 +1,2 @@
{
}

View File

@ -0,0 +1,9 @@
:language: vbnet
include::../description.adoc[]
include::../why-dotnet.adoc[]
include::../how-dotnet.adoc[]
include::../resources-dotnet.adoc[]