From b0d5ee026c896a4cb61d990d358b0842280c2843 Mon Sep 17 00:00:00 2001 From: Gregory Paidis <115458417+gregory-paidis-sonarsource@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:30:55 +0100 Subject: [PATCH] .NET ITs: Move .NET5 code to CSharpLatest (#8808) --- .../S1067-Net5-net5.0.json | 2 +- .../S1075-Net5-net5.0.json | 2 +- .../S108-Net5-net5.0.json | 36 +-- .../S109-Net5-net5.0.json | 86 +++---- .../S1144-Net5-net5.0.json | 10 +- .../S1186-Net5-net5.0.json | 4 +- .../S1192-Net5-net5.0.json | 4 +- .../S1199-Net5-net5.0.json | 2 +- .../S122-Net5-net5.0.json | 6 +- .../S1301-Net5-net5.0.json | 4 +- .../S131-Net5-net5.0.json | 4 +- .../S134-Net5-net5.0.json | 2 +- .../S138-Net5-net5.0.json | 2 +- .../CSharpLatest/S1451-Net5-net5.0.json | 52 +++++ .../CSharpLatest/S1481-Net5-net5.0.json | 52 +++++ .../S1541-Net5-net5.0.json | 2 +- .../S1659-Net5-net5.0.json | 4 +- .../S1694-Net5-net5.0.json | 2 +- .../S1854-Net5-net5.0.json | 2 +- .../S2077-Net5-net5.0.json | 2 +- .../S2092-Net5-net5.0.json | 4 +- .../S2094-Net5-net5.0.json | 2 +- .../S2115-Net5-net5.0.json | 10 +- .../S2187-Net5Test-net5.0.json | 2 +- .../S2221-Net5-net5.0.json | 4 +- .../S2325-Net5-net5.0.json | 6 +- .../S2326-Net5-net5.0.json | 8 +- .../S2330-Net5-net5.0.json | 4 +- .../S2436-Net5-net5.0.json | 2 +- .../S2486-Net5-net5.0.json | 4 +- .../CSharpLatest/S2583-Net5-net5.0.json | 16 ++ .../CSharpLatest/S2589-Net5-net5.0.json | 16 ++ .../S2699-Net5Test-net5.0.json | 4 +- .../S2701-Net5Test-net5.0.json | 2 +- .../S2760-Net5-net5.0.json | 26 +-- .../S2930-Net5-net5.0.json | 2 +- .../S2933-Net5-net5.0.json | 6 +- .../S3241-Net5-net5.0.json | 2 +- .../S3260-Net5-net5.0.json | 4 +- .../S3330-Net5-net5.0.json | 2 +- .../CSharpLatest/S3353-Net5-net5.0.json | 64 +++++ .../S3433-Net5Test-net5.0.json | 2 +- .../S3776-Net5-net5.0.json | 2 +- .../S3902-Net5-net5.0.json | 2 +- .../S3903-Net5-net5.0.json | 2 +- .../S3928-Net5-net5.0.json | 2 +- .../CSharpLatest/S3990-Net5-net5.0.json | 10 + .../CSharpLatest/S3992-Net5-net5.0.json | 10 + .../CSharpLatest/S4055-Net5-net5.0.json | 22 ++ .../S4144-Net5-net5.0.json | 2 +- .../S5122-Net5-net5.0.json | 2 +- .../S5659-Net5-net5.0.json | 2 +- .../its/expected/Net5/S1451-Net5-net5.0.json | 42 ---- .../its/expected/Net5/S1481-Net5-net5.0.json | 48 +--- .../its/expected/Net5/S2583-Net5-net5.0.json | 28 --- .../its/expected/Net5/S2589-Net5-net5.0.json | 28 --- .../its/expected/Net5/S3353-Net5-net5.0.json | 60 +---- .../its/expected/Net5/S4055-Net5-net5.0.json | 12 - .../its/sources/CSharpLatest/CSharpLatest.sln | 12 + .../its/sources/CSharpLatest/Net5/Main.cs | 219 ++++++++++++++++++ .../its/sources/CSharpLatest/Net5/Net5.csproj | 30 +++ .../{Net5 => CSharpLatest}/Net5/S2077.cs | 0 .../{Net5 => CSharpLatest}/Net5/S2092.cs | 0 .../{Net5 => CSharpLatest}/Net5/S2115.cs | 0 .../{Net5 => CSharpLatest}/Net5/S2330.cs | 0 .../{Net5 => CSharpLatest}/Net5/S3330.cs | 0 .../{Net5 => CSharpLatest}/Net5/S5122.cs | 0 .../{Net5 => CSharpLatest}/Net5/S5659.cs | 0 .../Net5Test/Net5Test.csproj | 0 .../{Net5 => CSharpLatest}/Net5Test/S2699.cs | 0 .../Net5Test/S3433_Mstest.cs | 0 .../Net5Test/S3433_Xunit.cs | 0 analyzers/its/sources/Net5/Net5/Main.cs | 218 +---------------- analyzers/its/sources/Net5/Net5/Net5.csproj | 21 -- analyzers/its/sources/Net5/net5.sln | 2 - 75 files changed, 654 insertions(+), 594 deletions(-) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1067-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1075-Net5-net5.0.json (80%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S108-Net5-net5.0.json (77%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S109-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1144-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1186-Net5-net5.0.json (83%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1192-Net5-net5.0.json (82%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1199-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S122-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1301-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S131-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S134-Net5-net5.0.json (80%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S138-Net5-net5.0.json (81%) create mode 100644 analyzers/its/expected/CSharpLatest/S1451-Net5-net5.0.json create mode 100644 analyzers/its/expected/CSharpLatest/S1481-Net5-net5.0.json rename analyzers/its/expected/{Net5 => CSharpLatest}/S1541-Net5-net5.0.json (82%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1659-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1694-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S1854-Net5-net5.0.json (80%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2077-Net5-net5.0.json (80%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2092-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2094-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2115-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2187-Net5Test-net5.0.json (74%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2221-Net5-net5.0.json (80%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2325-Net5-net5.0.json (77%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2326-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2330-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2436-Net5-net5.0.json (82%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2486-Net5-net5.0.json (79%) create mode 100644 analyzers/its/expected/CSharpLatest/S2583-Net5-net5.0.json create mode 100644 analyzers/its/expected/CSharpLatest/S2589-Net5-net5.0.json rename analyzers/its/expected/{Net5 => CSharpLatest}/S2699-Net5Test-net5.0.json (76%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2701-Net5Test-net5.0.json (74%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2760-Net5-net5.0.json (77%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2930-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S2933-Net5-net5.0.json (78%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3241-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3260-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3330-Net5-net5.0.json (81%) create mode 100644 analyzers/its/expected/CSharpLatest/S3353-Net5-net5.0.json rename analyzers/its/expected/{Net5 => CSharpLatest}/S3433-Net5Test-net5.0.json (77%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3776-Net5-net5.0.json (82%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3902-Net5-net5.0.json (82%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3903-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S3928-Net5-net5.0.json (80%) create mode 100644 analyzers/its/expected/CSharpLatest/S3990-Net5-net5.0.json create mode 100644 analyzers/its/expected/CSharpLatest/S3992-Net5-net5.0.json create mode 100644 analyzers/its/expected/CSharpLatest/S4055-Net5-net5.0.json rename analyzers/its/expected/{Net5 => CSharpLatest}/S4144-Net5-net5.0.json (81%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S5122-Net5-net5.0.json (79%) rename analyzers/its/expected/{Net5 => CSharpLatest}/S5659-Net5-net5.0.json (80%) delete mode 100644 analyzers/its/expected/Net5/S2583-Net5-net5.0.json delete mode 100644 analyzers/its/expected/Net5/S2589-Net5-net5.0.json create mode 100644 analyzers/its/sources/CSharpLatest/Net5/Main.cs create mode 100644 analyzers/its/sources/CSharpLatest/Net5/Net5.csproj rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S2077.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S2092.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S2115.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S2330.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S3330.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S5122.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5/S5659.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5Test/Net5Test.csproj (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5Test/S2699.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5Test/S3433_Mstest.cs (100%) rename analyzers/its/sources/{Net5 => CSharpLatest}/Net5Test/S3433_Xunit.cs (100%) diff --git a/analyzers/its/expected/Net5/S1067-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1067-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S1067-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1067-Net5-net5.0.json index d2bfe13407a..57c5f05570b 100644 --- a/analyzers/its/expected/Net5/S1067-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1067-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1067", "Message": "Reduce the number of conditional operators (19) used in the expression (maximum allowed 3).", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57-L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57-L61", "Location": "Lines 57-61 Position 5-80" } ] diff --git a/analyzers/its/expected/Net5/S1075-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1075-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S1075-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1075-Net5-net5.0.json index 89a22af3f93..5334698e69e 100644 --- a/analyzers/its/expected/Net5/S1075-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1075-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1075", "Message": "Refactor your code not to use hardcoded absolute paths or URIs.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L77", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L77", "Location": "Line 77 Position 26-39" } ] diff --git a/analyzers/its/expected/Net5/S108-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S108-Net5-net5.0.json similarity index 77% rename from analyzers/its/expected/Net5/S108-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S108-Net5-net5.0.json index 5c1dec9ac4b..695aeaccace 100644 --- a/analyzers/its/expected/Net5/S108-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S108-Net5-net5.0.json @@ -3,109 +3,109 @@ { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L100", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L100", "Location": "Line 100 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L101", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L101", "Location": "Line 101 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L102", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L102", "Location": "Line 102 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L103", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L103", "Location": "Line 103 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L104", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L104", "Location": "Line 104 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L105", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L105", "Location": "Line 105 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L106", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L106", "Location": "Line 106 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L107", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L107", "Location": "Line 107 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L108", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L108", "Location": "Line 108 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L109", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L109", "Location": "Line 109 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L44", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L44", "Location": "Line 44 Position 25-28" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L47", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L47", "Location": "Line 47 Position 23-26" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L51", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L51", "Location": "Line 51 Position 11-14" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L72-L73", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L72-L73", "Location": "Lines 72-73 Position 5-6" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 33-36" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L94", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L94", "Location": "Line 94 Position 26-29" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L98", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L98", "Location": "Line 98 Position 16-19" }, { "Id": "S108", "Message": "Either remove or fill this block of code.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L99", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L99", "Location": "Line 99 Position 16-19" } ] diff --git a/analyzers/its/expected/Net5/S109-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S109-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S109-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S109-Net5-net5.0.json index fd5b14c93bb..6c0bc0b9d81 100644 --- a/analyzers/its/expected/Net5/S109-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S109-Net5-net5.0.json @@ -3,259 +3,259 @@ { "Id": "S109", "Message": "Assign this magic number \u00272\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L21", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L21", "Location": "Line 21 Position 12-13" }, { "Id": "S109", "Message": "Assign this magic number \u00272\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L26", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L26", "Location": "Line 26 Position 12-13" }, { "Id": "S109", "Message": "Assign this magic number \u00272\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 18-19" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 32-33" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 37-38" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 51-52" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 56-57" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 70-71" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L57", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L57", "Location": "Line 57 Position 75-76" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 16-17" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 21-22" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 35-36" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 40-41" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 54-55" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 59-60" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 73-74" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L58", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L58", "Location": "Line 58 Position 78-79" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 16-17" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 21-22" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 35-36" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 40-41" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 54-55" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 59-60" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 73-74" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L59", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L59", "Location": "Line 59 Position 78-79" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 16-17" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 21-22" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 35-36" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 40-41" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 54-55" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 59-60" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 73-74" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L60", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L60", "Location": "Line 60 Position 78-79" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 16-17" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 21-22" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 35-36" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 40-41" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 54-55" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 59-60" }, { "Id": "S109", "Message": "Assign this magic number \u00273\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 73-74" }, { "Id": "S109", "Message": "Assign this magic number \u00275\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L61", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L61", "Location": "Line 61 Position 78-79" }, { "Id": "S109", "Message": "Assign this magic number \u00272\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L71", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L71", "Location": "Line 71 Position 13-14" }, { "Id": "S109", "Message": "Assign this magic number \u002742\u0027 to a well-named variable or constant, and use that instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L87", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L87", "Location": "Line 87 Position 25-27" } ] diff --git a/analyzers/its/expected/Net5/S1144-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1144-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S1144-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1144-Net5-net5.0.json index 874171f4cb0..3a5930c5f27 100644 --- a/analyzers/its/expected/Net5/S1144-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1144-Net5-net5.0.json @@ -3,31 +3,31 @@ { "Id": "S1144", "Message": "Remove the unused private field \u0027a\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L216", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L216", "Location": "Line 216 Position 5-19" }, { "Id": "S1144", "Message": "Remove the unused private method \u0027Foo\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2077.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2077.cs#L7", "Location": "Line 7 Position 14-17" }, { "Id": "S1144", "Message": "Remove the unused private field \u0027cookie\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2092.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2092.cs#L7", "Location": "Line 7 Position 9-83" }, { "Id": "S1144", "Message": "Remove the unused private field \u0027cookie\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S3330.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S3330.cs#L7", "Location": "Line 7 Position 9-52" }, { "Id": "S1144", "Message": "Remove the unused private field \u0027builder\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5122.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5122.cs#L7", "Location": "Line 7 Position 9-47" } ] diff --git a/analyzers/its/expected/Net5/S1186-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1186-Net5-net5.0.json similarity index 83% rename from analyzers/its/expected/Net5/S1186-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1186-Net5-net5.0.json index 701c702b8da..ba93de2ed46 100644 --- a/analyzers/its/expected/Net5/S1186-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1186-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S1186", "Message": "Add a nested comment explaining why this method is empty, throw a \u0027NotSupportedException\u0027 or complete the implementation.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 6-14" }, { "Id": "S1186", "Message": "Add a nested comment explaining why this method is empty, throw a \u0027NotSupportedException\u0027 or complete the implementation.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L94", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L94", "Location": "Line 94 Position 6-23" } ] diff --git a/analyzers/its/expected/Net5/S1192-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1192-Net5-net5.0.json similarity index 82% rename from analyzers/its/expected/Net5/S1192-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1192-Net5-net5.0.json index b4fb39dce65..e45af2ab99c 100644 --- a/analyzers/its/expected/Net5/S1192-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1192-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S1192", "Message": "Define a constant instead of using this literal \u0027foobar\u0027 4 times.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L80", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L80", "Location": "Line 80 Position 13-21" }, { "Id": "S1192", "Message": "Define a constant instead of using this literal \u0027Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=\u0027 5 times.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L9", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L9", "Location": "Line 9 Position 41-114" } ] diff --git a/analyzers/its/expected/Net5/S1199-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1199-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S1199-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1199-Net5-net5.0.json index 5dfd0743444..c2d6b7ee07f 100644 --- a/analyzers/its/expected/Net5/S1199-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1199-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1199", "Message": "Extract this nested code block into a separate method.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L70", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L70", "Location": "Line 70 Position 1-2" } ] diff --git a/analyzers/its/expected/Net5/S122-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S122-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S122-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S122-Net5-net5.0.json index 16efc6ee4be..3c1ee3f6b67 100644 --- a/analyzers/its/expected/Net5/S122-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S122-Net5-net5.0.json @@ -3,19 +3,19 @@ { "Id": "S122", "Message": "Reformat the code to have only one statement per line.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L17", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L17", "Location": "Line 17 Position 1-37" }, { "Id": "S122", "Message": "Reformat the code to have only one statement per line.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L18", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L18", "Location": "Line 18 Position 1-44" }, { "Id": "S122", "Message": "Reformat the code to have only one statement per line.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L87", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L87", "Location": "Line 87 Position 1-30" } ] diff --git a/analyzers/its/expected/Net5/S1301-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1301-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S1301-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1301-Net5-net5.0.json index bd45ea69307..36ccec71fdb 100644 --- a/analyzers/its/expected/Net5/S1301-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1301-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S1301", "Message": "Replace this \u0027switch\u0027 statement with \u0027if\u0027 statements to increase readability.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L19", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L19", "Location": "Line 19 Position 1-7" }, { "Id": "S1301", "Message": "Replace this \u0027switch\u0027 statement with \u0027if\u0027 statements to increase readability.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L24", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L24", "Location": "Line 24 Position 1-7" } ] diff --git a/analyzers/its/expected/Net5/S131-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S131-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S131-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S131-Net5-net5.0.json index a83860909fe..6acb2670586 100644 --- a/analyzers/its/expected/Net5/S131-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S131-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S131", "Message": "Add a \u0027default\u0027 clause to this \u0027switch\u0027 statement.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L19", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L19", "Location": "Line 19 Position 1-7" }, { "Id": "S131", "Message": "Add a \u0027default\u0027 clause to this \u0027switch\u0027 statement.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L24", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L24", "Location": "Line 24 Position 1-7" } ] diff --git a/analyzers/its/expected/Net5/S134-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S134-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S134-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S134-Net5-net5.0.json index 05fdcfe940d..db5e9cdff93 100644 --- a/analyzers/its/expected/Net5/S134-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S134-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S134", "Message": "Refactor this code to not nest more than 3 control flow statements.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L37", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L37", "Location": "Line 37 Position 13-15" } ] diff --git a/analyzers/its/expected/Net5/S138-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S138-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S138-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S138-Net5-net5.0.json index 2925a598971..d82240e7163 100644 --- a/analyzers/its/expected/Net5/S138-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S138-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S138", "Message": "This local function has 81 lines, which is greater than the 80 lines authorized.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L128", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L128", "Location": "Line 128 Position 6-18" } ] diff --git a/analyzers/its/expected/CSharpLatest/S1451-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1451-Net5-net5.0.json new file mode 100644 index 00000000000..f723b61c8ba --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S1451-Net5-net5.0.json @@ -0,0 +1,52 @@ +{ + "Issues": [ + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2077.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2092.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S3330.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5122.cs#L1", + "Location": "Line 1 Position 1-1" + }, + { + "Id": "S1451", + "Message": "Add or update the header of this file.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5659.cs#L1", + "Location": "Line 1 Position 1-1" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/CSharpLatest/S1481-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1481-Net5-net5.0.json new file mode 100644 index 00000000000..8642da99074 --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S1481-Net5-net5.0.json @@ -0,0 +1,52 @@ +{ + "Issues": [ + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027assem\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L67", + "Location": "Line 67 Position 10-15" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027fs0\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L77", + "Location": "Line 77 Position 5-8" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027l1\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L80", + "Location": "Line 80 Position 8-10" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027l2\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L81", + "Location": "Line 81 Position 8-10" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027l3\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L82", + "Location": "Line 82 Position 8-10" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027l4\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L83", + "Location": "Line 83 Position 8-10" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027command\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2077.cs#L9", + "Location": "Line 9 Position 27-34" + }, + { + "Id": "S1481", + "Message": "Remove the unused local variable \u0027fruits\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L11", + "Location": "Line 11 Position 21-27" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S1541-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1541-Net5-net5.0.json similarity index 82% rename from analyzers/its/expected/Net5/S1541-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1541-Net5-net5.0.json index cff90618313..9c1ab45028c 100644 --- a/analyzers/its/expected/Net5/S1541-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1541-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1541", "Message": "The Cyclomatic Complexity of this top-level file is 61 which is greater than 10 authorized.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L1", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L1", "Location": "Line 1 Position 1-1" } ] diff --git a/analyzers/its/expected/Net5/S1659-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1659-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S1659-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1659-Net5-net5.0.json index e3c746d9f51..465867704b4 100644 --- a/analyzers/its/expected/Net5/S1659-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1659-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S1659", "Message": "Declare \u0027b\u0027 in a separate statement.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L16", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L16", "Location": "Line 16 Position 12-13" }, { "Id": "S1659", "Message": "Declare \u0027two\u0027 in a separate statement.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L56", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L56", "Location": "Line 56 Position 14-17" } ] diff --git a/analyzers/its/expected/Net5/S1694-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1694-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S1694-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1694-Net5-net5.0.json index 0fc37aea87c..bcc6c9cd555 100644 --- a/analyzers/its/expected/Net5/S1694-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1694-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1694", "Message": "Convert this \u0027abstract\u0027 class to a concrete type with a protected constructor.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L5", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L5", "Location": "Line 5 Position 32-37" } ] diff --git a/analyzers/its/expected/Net5/S1854-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S1854-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S1854-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S1854-Net5-net5.0.json index 7bec660f976..89ae41b5ff3 100644 --- a/analyzers/its/expected/Net5/S1854-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S1854-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S1854", "Message": "Remove this useless assignment to local variable \u0027i\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L210", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L210", "Location": "Line 210 Position 5-8" } ] diff --git a/analyzers/its/expected/Net5/S2077-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2077-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S2077-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2077-Net5-net5.0.json index 476f294ea7b..8e3beb8f511 100644 --- a/analyzers/its/expected/Net5/S2077-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2077-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2077", "Message": "Make sure using a dynamically formatted SQL query is safe here.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2077.cs#L9", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2077.cs#L9", "Location": "Line 9 Position 37-99" } ] diff --git a/analyzers/its/expected/Net5/S2092-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2092-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S2092-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2092-Net5-net5.0.json index e8460b8e671..1297c0cb5a3 100644 --- a/analyzers/its/expected/Net5/S2092-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2092-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S2092", "Message": "Make sure creating this cookie without setting the \u0027Secure\u0027 property is safe here.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2092.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2092.cs#L7", "Location": "Line 7 Position 30-82" }, { "Id": "S2092", "Message": "Make sure creating this cookie without setting the \u0027Secure\u0027 property is safe here.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S3330.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S3330.cs#L7", "Location": "Line 7 Position 30-51" } ] diff --git a/analyzers/its/expected/Net5/S2094-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2094-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S2094-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2094-Net5-net5.0.json index 95cfa0feaea..452bb366e0f 100644 --- a/analyzers/its/expected/Net5/S2094-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2094-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2094", "Message": "Remove this empty class, write its code or make it an \u0022interface\u0022.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L5", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L5", "Location": "Line 5 Position 32-37" } ] diff --git a/analyzers/its/expected/Net5/S2115-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2115-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S2115-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2115-Net5-net5.0.json index eedbe33c48e..36ccd2c993c 100644 --- a/analyzers/its/expected/Net5/S2115-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2115-Net5-net5.0.json @@ -3,31 +3,31 @@ { "Id": "S2115", "Message": "Use a secure password when connecting to this database.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L10", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L10", "Location": "Line 10 Position 13-112" }, { "Id": "S2115", "Message": "Use a secure password when connecting to this database.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L11", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L11", "Location": "Line 11 Position 13-111" }, { "Id": "S2115", "Message": "Use a secure password when connecting to this database.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L12", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L12", "Location": "Line 12 Position 13-112" }, { "Id": "S2115", "Message": "Use a secure password when connecting to this database.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L13", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L13", "Location": "Line 13 Position 13-112" }, { "Id": "S2115", "Message": "Use a secure password when connecting to this database.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L9", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2115.cs#L9", "Location": "Line 9 Position 13-115" } ] diff --git a/analyzers/its/expected/Net5/S2187-Net5Test-net5.0.json b/analyzers/its/expected/CSharpLatest/S2187-Net5Test-net5.0.json similarity index 74% rename from analyzers/its/expected/Net5/S2187-Net5Test-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2187-Net5Test-net5.0.json index 9b585917d59..a420e1e294c 100644 --- a/analyzers/its/expected/Net5/S2187-Net5Test-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2187-Net5Test-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2187", "Message": "Add some tests to this class.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5Test/S3433_Mstest.cs#L6", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5Test/S3433_Mstest.cs#L6", "Location": "Line 6 Position 18-30" } ] diff --git a/analyzers/its/expected/Net5/S2221-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2221-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S2221-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2221-Net5-net5.0.json index fcbaadd074b..79f0f87b169 100644 --- a/analyzers/its/expected/Net5/S2221-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2221-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S2221", "Message": "Catch a list of specific exception subtype or use exception filters instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L47", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L47", "Location": "Line 47 Position 17-22" }, { "Id": "S2221", "Message": "Catch a list of specific exception subtype or use exception filters instead.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L51", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L51", "Location": "Line 51 Position 5-10" } ] diff --git a/analyzers/its/expected/Net5/S2325-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2325-Net5-net5.0.json similarity index 77% rename from analyzers/its/expected/Net5/S2325-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2325-Net5-net5.0.json index 4bad65bebb8..835e415ab58 100644 --- a/analyzers/its/expected/Net5/S2325-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2325-Net5-net5.0.json @@ -3,19 +3,19 @@ { "Id": "S2325", "Message": "Make \u0027Foo\u0027 a static method.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2077.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2077.cs#L7", "Location": "Line 7 Position 14-17" }, { "Id": "S2325", "Message": "Make \u0027TestCases\u0027 a static method.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L9", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L9", "Location": "Line 9 Position 21-30" }, { "Id": "S2325", "Message": "Make \u0027Foo\u0027 a static method.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5659.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5659.cs#L7", "Location": "Line 7 Position 21-24" } ] diff --git a/analyzers/its/expected/Net5/S2326-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2326-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S2326-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2326-Net5-net5.0.json index 6e3fad0c20f..43ab5c4cc41 100644 --- a/analyzers/its/expected/Net5/S2326-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2326-Net5-net5.0.json @@ -3,25 +3,25 @@ { "Id": "S2326", "Message": "\u0027T1\u0027 is not used in the local function.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 15-17" }, { "Id": "S2326", "Message": "\u0027T2\u0027 is not used in the local function.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 19-21" }, { "Id": "S2326", "Message": "\u0027T3\u0027 is not used in the local function.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 23-25" }, { "Id": "S2326", "Message": "\u0027T4\u0027 is not used in the local function.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 27-29" } ] diff --git a/analyzers/its/expected/Net5/S2330-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2330-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S2330-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2330-Net5-net5.0.json index a3c6b4a7eee..48e73ee8431 100644 --- a/analyzers/its/expected/Net5/S2330-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2330-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S2330", "Message": "Refactor the code to not rely on potentially unsafe array conversions.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L12", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L12", "Location": "Line 12 Position 19-31" }, { "Id": "S2330", "Message": "Refactor the code to not rely on potentially unsafe array conversions.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L13", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L13", "Location": "Line 13 Position 19-32" } ] diff --git a/analyzers/its/expected/Net5/S2436-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2436-Net5-net5.0.json similarity index 82% rename from analyzers/its/expected/Net5/S2436-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2436-Net5-net5.0.json index 47edae1a1ba..33f7195ff7f 100644 --- a/analyzers/its/expected/Net5/S2436-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2436-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2436", "Message": "Reduce the number of generic parameters in the \u0027LocalBar\u0027 method to no more than the 3 authorized.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L91", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L91", "Location": "Line 91 Position 6-14" } ] diff --git a/analyzers/its/expected/Net5/S2486-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2486-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S2486-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2486-Net5-net5.0.json index a11b7022809..9a925e953ab 100644 --- a/analyzers/its/expected/Net5/S2486-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2486-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S2486", "Message": "Handle the exception or explain in a comment why it can be ignored.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L47", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L47", "Location": "Line 47 Position 17-26" }, { "Id": "S2486", "Message": "Handle the exception or explain in a comment why it can be ignored.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L51", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L51", "Location": "Line 51 Position 5-14" } ] diff --git a/analyzers/its/expected/CSharpLatest/S2583-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2583-Net5-net5.0.json new file mode 100644 index 00000000000..f8733bc8424 --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S2583-Net5-net5.0.json @@ -0,0 +1,16 @@ +{ + "Issues": [ + { + "Id": "S2583", + "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L17", + "Location": "Line 17 Position 5-11" + }, + { + "Id": "S2583", + "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L18", + "Location": "Line 18 Position 5-11" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/CSharpLatest/S2589-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2589-Net5-net5.0.json new file mode 100644 index 00000000000..55fcbbfaeaf --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S2589-Net5-net5.0.json @@ -0,0 +1,16 @@ +{ + "Issues": [ + { + "Id": "S2589", + "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L21", + "Location": "Line 21 Position 10-13" + }, + { + "Id": "S2589", + "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L26", + "Location": "Line 26 Position 10-13" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S2699-Net5Test-net5.0.json b/analyzers/its/expected/CSharpLatest/S2699-Net5Test-net5.0.json similarity index 76% rename from analyzers/its/expected/Net5/S2699-Net5Test-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2699-Net5Test-net5.0.json index a91ac47d351..50570436119 100644 --- a/analyzers/its/expected/Net5/S2699-Net5Test-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2699-Net5Test-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S2699", "Message": "Add at least one assertion to this test case.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5Test/S2699.cs#L13", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5Test/S2699.cs#L13", "Location": "Line 13 Position 18-26" }, { "Id": "S2699", "Message": "Add at least one assertion to this test case.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5Test/S2699.cs#L16", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5Test/S2699.cs#L16", "Location": "Line 16 Position 25-39" } ] diff --git a/analyzers/its/expected/Net5/S2701-Net5Test-net5.0.json b/analyzers/its/expected/CSharpLatest/S2701-Net5Test-net5.0.json similarity index 74% rename from analyzers/its/expected/Net5/S2701-Net5Test-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2701-Net5Test-net5.0.json index 0d2133161b1..c9066678671 100644 --- a/analyzers/its/expected/Net5/S2701-Net5Test-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2701-Net5Test-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2701", "Message": "Remove or correct this assertion.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5Test/S3433_Mstest.cs#L13", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5Test/S3433_Mstest.cs#L13", "Location": "Line 13 Position 17-36" } ] diff --git a/analyzers/its/expected/Net5/S2760-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2760-Net5-net5.0.json similarity index 77% rename from analyzers/its/expected/Net5/S2760-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2760-Net5-net5.0.json index 1065144b271..a04beea9818 100644 --- a/analyzers/its/expected/Net5/S2760-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2760-Net5-net5.0.json @@ -3,79 +3,79 @@ { "Id": "S2760", "Message": "This condition was just checked on line 99.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L100", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L100", "Location": "Line 100 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 100.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L101", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L101", "Location": "Line 101 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 101.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L102", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L102", "Location": "Line 102 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 102.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L103", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L103", "Location": "Line 103 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 103.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L104", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L104", "Location": "Line 104 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 104.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L105", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L105", "Location": "Line 105 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 105.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L106", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L106", "Location": "Line 106 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 106.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L107", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L107", "Location": "Line 107 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 107.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L108", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L108", "Location": "Line 108 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 108.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L109", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L109", "Location": "Line 109 Position 9-14" }, { "Id": "S2760", "Message": "This condition was just checked on line 17.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L18", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L18", "Location": "Line 18 Position 5-11" }, { "Id": "S2760", "Message": "This condition was just checked on line 19.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L24", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L24", "Location": "Line 24 Position 9-10" }, { "Id": "S2760", "Message": "This condition was just checked on line 98.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L99", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L99", "Location": "Line 99 Position 9-14" } ] diff --git a/analyzers/its/expected/Net5/S2930-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2930-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S2930-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2930-Net5-net5.0.json index 38422fea26a..c6fa75377c5 100644 --- a/analyzers/its/expected/Net5/S2930-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2930-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S2930", "Message": "Dispose \u0027fs0\u0027 when it is no longer needed.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L77", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L77", "Location": "Line 77 Position 5-55" } ] diff --git a/analyzers/its/expected/Net5/S2933-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S2933-Net5-net5.0.json similarity index 78% rename from analyzers/its/expected/Net5/S2933-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S2933-Net5-net5.0.json index ed02da87664..19a286b895e 100644 --- a/analyzers/its/expected/Net5/S2933-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S2933-Net5-net5.0.json @@ -3,19 +3,19 @@ { "Id": "S2933", "Message": "Make \u0027cookie\u0027 \u0027readonly\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2092.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2092.cs#L7", "Location": "Line 7 Position 21-27" }, { "Id": "S2933", "Message": "Make \u0027cookie\u0027 \u0027readonly\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S3330.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S3330.cs#L7", "Location": "Line 7 Position 21-27" }, { "Id": "S2933", "Message": "Make \u0027builder\u0027 \u0027readonly\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5122.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5122.cs#L7", "Location": "Line 7 Position 27-34" } ] diff --git a/analyzers/its/expected/Net5/S3241-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3241-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S3241-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3241-Net5-net5.0.json index c7afe64e454..facb3269200 100644 --- a/analyzers/its/expected/Net5/S3241-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3241-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3241", "Message": "Change return type to \u0027void\u0027; not a single caller uses the returned value.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L87", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L87", "Location": "Line 87 Position 1-4" } ] diff --git a/analyzers/its/expected/Net5/S3260-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3260-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S3260-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3260-Net5-net5.0.json index 49db23b1507..f10694c7583 100644 --- a/analyzers/its/expected/Net5/S3260-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3260-Net5-net5.0.json @@ -3,13 +3,13 @@ { "Id": "S3260", "Message": "Private classes which are not derived in the current assembly should be marked as \u0027sealed\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L6", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L6", "Location": "Line 6 Position 23-28" }, { "Id": "S3260", "Message": "Private classes which are not derived in the current assembly should be marked as \u0027sealed\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S2330.cs#L7", "Location": "Line 7 Position 23-29" } ] diff --git a/analyzers/its/expected/Net5/S3330-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3330-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S3330-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3330-Net5-net5.0.json index 381c9b29c72..8af4316e20e 100644 --- a/analyzers/its/expected/Net5/S3330-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3330-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3330", "Message": "Make sure creating this cookie without the \u0022HttpOnly\u0022 flag is safe.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S3330.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S3330.cs#L7", "Location": "Line 7 Position 30-51" } ] diff --git a/analyzers/its/expected/CSharpLatest/S3353-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3353-Net5-net5.0.json new file mode 100644 index 00000000000..a8fb0413681 --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S3353-Net5-net5.0.json @@ -0,0 +1,64 @@ +{ + "Issues": [ + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027s\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L118", + "Location": "Line 118 Position 12-13" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027s\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L123", + "Location": "Line 123 Position 12-13" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027b\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L16", + "Location": "Line 16 Position 12-13" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027a\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L16", + "Location": "Line 16 Position 5-6" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027two\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L56", + "Location": "Line 56 Position 14-17" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027one\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L56", + "Location": "Line 56 Position 5-8" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027l1\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L80", + "Location": "Line 80 Position 8-10" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027l2\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L81", + "Location": "Line 81 Position 8-10" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027l3\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L82", + "Location": "Line 82 Position 8-10" + }, + { + "Id": "S3353", + "Message": "Add the \u0027const\u0027 modifier to \u0027l4\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L83", + "Location": "Line 83 Position 8-10" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S3433-Net5Test-net5.0.json b/analyzers/its/expected/CSharpLatest/S3433-Net5Test-net5.0.json similarity index 77% rename from analyzers/its/expected/Net5/S3433-Net5Test-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3433-Net5Test-net5.0.json index e7838fa224d..ad3486154e0 100644 --- a/analyzers/its/expected/Net5/S3433-Net5Test-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3433-Net5Test-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3433", "Message": "Make this test method a public method instead of a local function.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5Test/S3433_Mstest.cs#L11", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5Test/S3433_Mstest.cs#L11", "Location": "Line 11 Position 18-28" } ] diff --git a/analyzers/its/expected/Net5/S3776-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3776-Net5-net5.0.json similarity index 82% rename from analyzers/its/expected/Net5/S3776-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3776-Net5-net5.0.json index 13ad3016e54..ede5d50a5f9 100644 --- a/analyzers/its/expected/Net5/S3776-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3776-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3776", "Message": "Refactor this top-level file to reduce its Cognitive Complexity from 73 to the 15 allowed.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L1", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L1", "Location": "Line 1 Position 1-1" } ] diff --git a/analyzers/its/expected/Net5/S3902-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3902-Net5-net5.0.json similarity index 82% rename from analyzers/its/expected/Net5/S3902-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3902-Net5-net5.0.json index de566fb5737..9d042194360 100644 --- a/analyzers/its/expected/Net5/S3902-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3902-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3902", "Message": "Replace this call to \u0027Assembly.GetExecutingAssembly()\u0027 with \u0027Type.Assembly\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L67", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L67", "Location": "Line 67 Position 27-47" } ] diff --git a/analyzers/its/expected/Net5/S3903-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3903-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S3903-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3903-Net5-net5.0.json index f2a2439f731..c1491861c6c 100644 --- a/analyzers/its/expected/Net5/S3903-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3903-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3903", "Message": "Move \u0027Record\u0027 into a named namespace.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L213", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L213", "Location": "Line 213 Position 15-21" } ] diff --git a/analyzers/its/expected/Net5/S3928-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3928-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S3928-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S3928-Net5-net5.0.json index 9928c8b7b97..ba125395f61 100644 --- a/analyzers/its/expected/Net5/S3928-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S3928-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S3928", "Message": "ArgumentException constructor arguments have been inverted.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L12", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L12", "Location": "Line 12 Position 11-51" } ] diff --git a/analyzers/its/expected/CSharpLatest/S3990-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3990-Net5-net5.0.json new file mode 100644 index 00000000000..f85e41adf34 --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S3990-Net5-net5.0.json @@ -0,0 +1,10 @@ +{ + "Issues": [ + { + "Id": "S3990", + "Message": "Provide a \u0027CLSCompliant\u0027 attribute for assembly \u0027Net5\u0027.", + "Uri": null, + "Location": null + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/CSharpLatest/S3992-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S3992-Net5-net5.0.json new file mode 100644 index 00000000000..3e5ae2af2bf --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S3992-Net5-net5.0.json @@ -0,0 +1,10 @@ +{ + "Issues": [ + { + "Id": "S3992", + "Message": "Provide a \u0027ComVisible\u0027 attribute for assembly \u0027Net5\u0027.", + "Uri": null, + "Location": null + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/CSharpLatest/S4055-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S4055-Net5-net5.0.json new file mode 100644 index 00000000000..390598c511a --- /dev/null +++ b/analyzers/its/expected/CSharpLatest/S4055-Net5-net5.0.json @@ -0,0 +1,22 @@ +{ + "Issues": [ + { + "Id": "S4055", + "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L119", + "Location": "Line 119 Position 23-36" + }, + { + "Id": "S4055", + "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L124", + "Location": "Line 124 Position 23-36" + }, + { + "Id": "S4055", + "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L5", + "Location": "Line 5 Position 19-33" + } + ] +} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S4144-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S4144-Net5-net5.0.json similarity index 81% rename from analyzers/its/expected/Net5/S4144-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S4144-Net5-net5.0.json index 12ccf05d1b4..b032a0418df 100644 --- a/analyzers/its/expected/Net5/S4144-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S4144-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S4144", "Message": "Update this method so that its implementation is not identical to \u0027Method1\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L121", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/Main.cs#L121", "Location": "Line 121 Position 6-13" } ] diff --git a/analyzers/its/expected/Net5/S5122-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S5122-Net5-net5.0.json similarity index 79% rename from analyzers/its/expected/Net5/S5122-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S5122-Net5-net5.0.json index 7f377e863cd..ed9dda5c5ab 100644 --- a/analyzers/its/expected/Net5/S5122-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S5122-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S5122", "Message": "Make sure this permissive CORS policy is safe here.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5122.cs#L7", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5122.cs#L7", "Location": "Line 7 Position 37-46" } ] diff --git a/analyzers/its/expected/Net5/S5659-Net5-net5.0.json b/analyzers/its/expected/CSharpLatest/S5659-Net5-net5.0.json similarity index 80% rename from analyzers/its/expected/Net5/S5659-Net5-net5.0.json rename to analyzers/its/expected/CSharpLatest/S5659-Net5-net5.0.json index f21226c5a32..36c16b079c1 100644 --- a/analyzers/its/expected/Net5/S5659-Net5-net5.0.json +++ b/analyzers/its/expected/CSharpLatest/S5659-Net5-net5.0.json @@ -3,7 +3,7 @@ { "Id": "S5659", "Message": "Use only strong cipher algorithms when verifying the signature of this JWT.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5659.cs#L10", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/CSharpLatest/Net5/S5659.cs#L10", "Location": "Line 10 Position 13-47" } ] diff --git a/analyzers/its/expected/Net5/S1451-Net5-net5.0.json b/analyzers/its/expected/Net5/S1451-Net5-net5.0.json index 3eca5a7f991..824c50865df 100644 --- a/analyzers/its/expected/Net5/S1451-Net5-net5.0.json +++ b/analyzers/its/expected/Net5/S1451-Net5-net5.0.json @@ -5,48 +5,6 @@ "Message": "Add or update the header of this file.", "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L1", "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2077.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2092.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2115.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S3330.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5122.cs#L1", - "Location": "Line 1 Position 1-1" - }, - { - "Id": "S1451", - "Message": "Add or update the header of this file.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S5659.cs#L1", - "Location": "Line 1 Position 1-1" } ] } \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S1481-Net5-net5.0.json b/analyzers/its/expected/Net5/S1481-Net5-net5.0.json index dcbbf3d80b2..20d4b97fe9a 100644 --- a/analyzers/its/expected/Net5/S1481-Net5-net5.0.json +++ b/analyzers/its/expected/Net5/S1481-Net5-net5.0.json @@ -2,51 +2,9 @@ "Issues": [ { "Id": "S1481", - "Message": "Remove the unused local variable \u0027assem\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L67", - "Location": "Line 67 Position 10-15" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027fs0\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L77", - "Location": "Line 77 Position 5-8" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027l1\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L80", - "Location": "Line 80 Position 8-10" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027l2\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L81", - "Location": "Line 81 Position 8-10" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027l3\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L82", - "Location": "Line 82 Position 8-10" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027l4\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L83", - "Location": "Line 83 Position 8-10" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027command\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2077.cs#L9", - "Location": "Line 9 Position 27-34" - }, - { - "Id": "S1481", - "Message": "Remove the unused local variable \u0027fruits\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/S2330.cs#L11", - "Location": "Line 11 Position 21-27" + "Message": "Remove the unused local variable \u0027foo\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L4", + "Location": "Line 4 Position 5-8" } ] } \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S2583-Net5-net5.0.json b/analyzers/its/expected/Net5/S2583-Net5-net5.0.json deleted file mode 100644 index c26a5abefbb..00000000000 --- a/analyzers/its/expected/Net5/S2583-Net5-net5.0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "Issues": [ - { - "Id": "S2583", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L17", - "Location": "Line 17 Position 5-11" - }, - { - "Id": "S2583", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L17", - "Location": "Line 17 Position 5-11" - }, - { - "Id": "S2583", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L18", - "Location": "Line 18 Position 5-11" - }, - { - "Id": "S2583", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027. Some code paths are unreachable.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L18", - "Location": "Line 18 Position 5-11" - } - ] -} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S2589-Net5-net5.0.json b/analyzers/its/expected/Net5/S2589-Net5-net5.0.json deleted file mode 100644 index 54029274cd4..00000000000 --- a/analyzers/its/expected/Net5/S2589-Net5-net5.0.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "Issues": [ - { - "Id": "S2589", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L21", - "Location": "Line 21 Position 10-13" - }, - { - "Id": "S2589", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L21", - "Location": "Line 21 Position 10-13" - }, - { - "Id": "S2589", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L26", - "Location": "Line 26 Position 10-13" - }, - { - "Id": "S2589", - "Message": "Change this condition so that it does not always evaluate to \u0027False\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L26", - "Location": "Line 26 Position 10-13" - } - ] -} \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S3353-Net5-net5.0.json b/analyzers/its/expected/Net5/S3353-Net5-net5.0.json index eb08154529b..78e8a6cf8a7 100644 --- a/analyzers/its/expected/Net5/S3353-Net5-net5.0.json +++ b/analyzers/its/expected/Net5/S3353-Net5-net5.0.json @@ -2,63 +2,9 @@ "Issues": [ { "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027s\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L118", - "Location": "Line 118 Position 12-13" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027s\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L123", - "Location": "Line 123 Position 12-13" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027b\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L16", - "Location": "Line 16 Position 12-13" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027a\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L16", - "Location": "Line 16 Position 5-6" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027two\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L56", - "Location": "Line 56 Position 14-17" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027one\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L56", - "Location": "Line 56 Position 5-8" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027l1\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L80", - "Location": "Line 80 Position 8-10" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027l2\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L81", - "Location": "Line 81 Position 8-10" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027l3\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L82", - "Location": "Line 82 Position 8-10" - }, - { - "Id": "S3353", - "Message": "Add the \u0027const\u0027 modifier to \u0027l4\u0027.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L83", - "Location": "Line 83 Position 8-10" + "Message": "Add the \u0027const\u0027 modifier to \u0027foo\u0027, and replace \u0027var\u0027 with \u0027int\u0027.", + "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L4", + "Location": "Line 4 Position 5-8" } ] } \ No newline at end of file diff --git a/analyzers/its/expected/Net5/S4055-Net5-net5.0.json b/analyzers/its/expected/Net5/S4055-Net5-net5.0.json index 667ef396e5a..604525c8322 100644 --- a/analyzers/its/expected/Net5/S4055-Net5-net5.0.json +++ b/analyzers/its/expected/Net5/S4055-Net5-net5.0.json @@ -1,17 +1,5 @@ { "Issues": [ - { - "Id": "S4055", - "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L119", - "Location": "Line 119 Position 23-36" - }, - { - "Id": "S4055", - "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", - "Uri": "https://github.com/SonarSource/sonar-dotnet/blob/master/analyzers/its/sources/Net5/Net5/Main.cs#L124", - "Location": "Line 124 Position 23-36" - }, { "Id": "S4055", "Message": "Replace this string literal with a string retrieved through an instance of the \u0027ResourceManager\u0027 class.", diff --git a/analyzers/its/sources/CSharpLatest/CSharpLatest.sln b/analyzers/its/sources/CSharpLatest/CSharpLatest.sln index 020b0336a88..7e2671e5344 100644 --- a/analyzers/its/sources/CSharpLatest/CSharpLatest.sln +++ b/analyzers/its/sources/CSharpLatest/CSharpLatest.sln @@ -9,6 +9,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore31.MVC", "NetCore31\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore31.MVC.ConfigurableRules", "NetCore31WithConfigurableRules\NetCore31.MVC.ConfigurableRules.csproj", "{032F28CC-405C-407A-9F41-F123BF0CFBF5}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Net5", "Net5\Net5.csproj", "{4B6C54D3-B22F-4359-850A-C6E9A3D87721}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Net5Test", "Net5Test\Net5Test.csproj", "{320BC8DA-5ABA-48EF-B962-1436E727C4CF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +31,14 @@ Global {032F28CC-405C-407A-9F41-F123BF0CFBF5}.Debug|Any CPU.Build.0 = Debug|Any CPU {032F28CC-405C-407A-9F41-F123BF0CFBF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {032F28CC-405C-407A-9F41-F123BF0CFBF5}.Release|Any CPU.Build.0 = Release|Any CPU + {4B6C54D3-B22F-4359-850A-C6E9A3D87721}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B6C54D3-B22F-4359-850A-C6E9A3D87721}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B6C54D3-B22F-4359-850A-C6E9A3D87721}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B6C54D3-B22F-4359-850A-C6E9A3D87721}.Release|Any CPU.Build.0 = Release|Any CPU + {320BC8DA-5ABA-48EF-B962-1436E727C4CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {320BC8DA-5ABA-48EF-B962-1436E727C4CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {320BC8DA-5ABA-48EF-B962-1436E727C4CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {320BC8DA-5ABA-48EF-B962-1436E727C4CF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/analyzers/its/sources/CSharpLatest/Net5/Main.cs b/analyzers/its/sources/CSharpLatest/Net5/Main.cs new file mode 100644 index 00000000000..d7544e62e35 --- /dev/null +++ b/analyzers/its/sources/CSharpLatest/Net5/Main.cs @@ -0,0 +1,219 @@ +using System; +using System.IO; +using System.Reflection; + +Console.WriteLine("Hello World!"); + +LocalMethodInMain(); + +// S3928 +if (args == null) +{ + throw new ArgumentException("args", "message"); +} + +// S2760 +int a = 0, b = 1; +if (a == b) { LocalMethodInMain(); } +if (a == b) { AnotherLocalMethodInMain(); } +switch (b) +{ + case > 2: + break; +} +switch (b) +{ + case > 2: + break; +} + +// S134 +do +{ + try + { + while (true) + { + if (true) + { + try + { + while (true) + { + if (true) + { } + } + } + catch { } + } + } + } + catch { } +} while (false); + +// S3776 +string field = null; +int one = 1, two = 2; +if ((one is 1 or 2) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) + || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) + || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) + || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) + || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5)) +{ + field = ""; +} + +// S3902 +Assembly assem = Assembly.GetExecutingAssembly(); + +// S1199 +{ + if (1 < 2) + { + } +} + +// S2930 +var fs0 = new FileStream(@"c:\foo.txt", FileMode.Open); + +// S1192 +string l1 = "foobar"; +string l2 = "foobar"; +string l3 = "foobar"; +string l4 = "foobar"; + +// S3241 +MyMethod(); +int MyMethod() { return 42; } + + +// S2436 +void LocalBar() { } + +// S1186 +void LocalMethodInMain() { } + +// S1541 +void AnotherLocalMethodInMain() { + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } + if (false) { } +} + +// S4823 +Console.WriteLine(args[0]); + +// S4144 +void Method1() +{ + string s = "test"; + Console.WriteLine("Result: {0}", s); +} +void Method2() +{ + string s = "test"; + Console.WriteLine("Result: {0}", s); +} + +// S138 +void LongFunction(int i) +{ + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; + i++; +} + +public record Record +{ + // S1144 + private int a; +} + + diff --git a/analyzers/its/sources/CSharpLatest/Net5/Net5.csproj b/analyzers/its/sources/CSharpLatest/Net5/Net5.csproj new file mode 100644 index 00000000000..dd9a00a84a3 --- /dev/null +++ b/analyzers/its/sources/CSharpLatest/Net5/Net5.csproj @@ -0,0 +1,30 @@ + + + + Exe + net5.0 + preview + + + + true + + + + true + + + + + + + + + + + + + + + + diff --git a/analyzers/its/sources/Net5/Net5/S2077.cs b/analyzers/its/sources/CSharpLatest/Net5/S2077.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S2077.cs rename to analyzers/its/sources/CSharpLatest/Net5/S2077.cs diff --git a/analyzers/its/sources/Net5/Net5/S2092.cs b/analyzers/its/sources/CSharpLatest/Net5/S2092.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S2092.cs rename to analyzers/its/sources/CSharpLatest/Net5/S2092.cs diff --git a/analyzers/its/sources/Net5/Net5/S2115.cs b/analyzers/its/sources/CSharpLatest/Net5/S2115.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S2115.cs rename to analyzers/its/sources/CSharpLatest/Net5/S2115.cs diff --git a/analyzers/its/sources/Net5/Net5/S2330.cs b/analyzers/its/sources/CSharpLatest/Net5/S2330.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S2330.cs rename to analyzers/its/sources/CSharpLatest/Net5/S2330.cs diff --git a/analyzers/its/sources/Net5/Net5/S3330.cs b/analyzers/its/sources/CSharpLatest/Net5/S3330.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S3330.cs rename to analyzers/its/sources/CSharpLatest/Net5/S3330.cs diff --git a/analyzers/its/sources/Net5/Net5/S5122.cs b/analyzers/its/sources/CSharpLatest/Net5/S5122.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S5122.cs rename to analyzers/its/sources/CSharpLatest/Net5/S5122.cs diff --git a/analyzers/its/sources/Net5/Net5/S5659.cs b/analyzers/its/sources/CSharpLatest/Net5/S5659.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5/S5659.cs rename to analyzers/its/sources/CSharpLatest/Net5/S5659.cs diff --git a/analyzers/its/sources/Net5/Net5Test/Net5Test.csproj b/analyzers/its/sources/CSharpLatest/Net5Test/Net5Test.csproj similarity index 100% rename from analyzers/its/sources/Net5/Net5Test/Net5Test.csproj rename to analyzers/its/sources/CSharpLatest/Net5Test/Net5Test.csproj diff --git a/analyzers/its/sources/Net5/Net5Test/S2699.cs b/analyzers/its/sources/CSharpLatest/Net5Test/S2699.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5Test/S2699.cs rename to analyzers/its/sources/CSharpLatest/Net5Test/S2699.cs diff --git a/analyzers/its/sources/Net5/Net5Test/S3433_Mstest.cs b/analyzers/its/sources/CSharpLatest/Net5Test/S3433_Mstest.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5Test/S3433_Mstest.cs rename to analyzers/its/sources/CSharpLatest/Net5Test/S3433_Mstest.cs diff --git a/analyzers/its/sources/Net5/Net5Test/S3433_Xunit.cs b/analyzers/its/sources/CSharpLatest/Net5Test/S3433_Xunit.cs similarity index 100% rename from analyzers/its/sources/Net5/Net5Test/S3433_Xunit.cs rename to analyzers/its/sources/CSharpLatest/Net5Test/S3433_Xunit.cs diff --git a/analyzers/its/sources/Net5/Net5/Main.cs b/analyzers/its/sources/Net5/Net5/Main.cs index d7544e62e35..c5fe98de66d 100644 --- a/analyzers/its/sources/Net5/Net5/Main.cs +++ b/analyzers/its/sources/Net5/Net5/Main.cs @@ -1,219 +1,5 @@ using System; -using System.IO; -using System.Reflection; +// Next line triggers S1481 to make sure issues are raised +var foo = 42; Console.WriteLine("Hello World!"); - -LocalMethodInMain(); - -// S3928 -if (args == null) -{ - throw new ArgumentException("args", "message"); -} - -// S2760 -int a = 0, b = 1; -if (a == b) { LocalMethodInMain(); } -if (a == b) { AnotherLocalMethodInMain(); } -switch (b) -{ - case > 2: - break; -} -switch (b) -{ - case > 2: - break; -} - -// S134 -do -{ - try - { - while (true) - { - if (true) - { - try - { - while (true) - { - if (true) - { } - } - } - catch { } - } - } - } - catch { } -} while (false); - -// S3776 -string field = null; -int one = 1, two = 2; -if ((one is 1 or 2) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) - || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) - || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) - || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) - || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5) || (two is 3 or 5)) -{ - field = ""; -} - -// S3902 -Assembly assem = Assembly.GetExecutingAssembly(); - -// S1199 -{ - if (1 < 2) - { - } -} - -// S2930 -var fs0 = new FileStream(@"c:\foo.txt", FileMode.Open); - -// S1192 -string l1 = "foobar"; -string l2 = "foobar"; -string l3 = "foobar"; -string l4 = "foobar"; - -// S3241 -MyMethod(); -int MyMethod() { return 42; } - - -// S2436 -void LocalBar() { } - -// S1186 -void LocalMethodInMain() { } - -// S1541 -void AnotherLocalMethodInMain() { - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } - if (false) { } -} - -// S4823 -Console.WriteLine(args[0]); - -// S4144 -void Method1() -{ - string s = "test"; - Console.WriteLine("Result: {0}", s); -} -void Method2() -{ - string s = "test"; - Console.WriteLine("Result: {0}", s); -} - -// S138 -void LongFunction(int i) -{ - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; - i++; -} - -public record Record -{ - // S1144 - private int a; -} - - diff --git a/analyzers/its/sources/Net5/Net5/Net5.csproj b/analyzers/its/sources/Net5/Net5/Net5.csproj index dd9a00a84a3..d7c391b76af 100644 --- a/analyzers/its/sources/Net5/Net5/Net5.csproj +++ b/analyzers/its/sources/Net5/Net5/Net5.csproj @@ -6,25 +6,4 @@ preview - - true - - - - true - - - - - - - - - - - - - - - diff --git a/analyzers/its/sources/Net5/net5.sln b/analyzers/its/sources/Net5/net5.sln index 4ca01fc0541..c94788e4419 100644 --- a/analyzers/its/sources/Net5/net5.sln +++ b/analyzers/its/sources/Net5/net5.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.8.34330.188 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Net5", "Net5\Net5.csproj", "{F9326C7E-D6A2-47C1-9062-C9C63413C92A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Net5Test", "Net5Test\Net5Test.csproj", "{A5FA90FD-12AB-4E52-BE5D-601A54C2CFA6}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU