Skip to content

Commit

Permalink
TestFramework: Create empty projects (#8565)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-mikula-sonarsource committed Jan 25, 2024
1 parent 7f91a13 commit 4972c6d
Show file tree
Hide file tree
Showing 10 changed files with 1,462 additions and 7 deletions.
18 changes: 16 additions & 2 deletions analyzers/SonarAnalyzer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common Solution Items", "Co
src\AssemblyInfo.Shared.cs = src\AssemblyInfo.Shared.cs
..\azure-pipelines.yml = ..\azure-pipelines.yml
NuGet.Config = NuGet.Config
..\README.md = ..\README.md
src\Signing.cs = src\Signing.cs
packaging\SonarAnalyzer.CSharp.nuspec = packaging\SonarAnalyzer.CSharp.nuspec
packaging\SonarAnalyzer.VisualBasic.nuspec = packaging\SonarAnalyzer.VisualBasic.nuspec
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B7233F78-E142-4882-B084-7C83BE472109}"
Expand Down Expand Up @@ -58,7 +58,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AnalysisConfig", "AnalysisC
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonarAnalyzer.SourceGenerators", "src\SonarAnalyzer.SourceGenerators\SonarAnalyzer.SourceGenerators.csproj", "{76D6EBB8-D2B0-41C1-8880-027EC78CB7FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SonarAnalyzer.Net8.Test", "tests\SonarAnalyzer.Net8.Test\SonarAnalyzer.Net8.Test.csproj", "{DB0A158B-D003-47ED-8209-E70277EB0693}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonarAnalyzer.Net8.Test", "tests\SonarAnalyzer.Net8.Test\SonarAnalyzer.Net8.Test.csproj", "{DB0A158B-D003-47ED-8209-E70277EB0693}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonarAnalyzer.TestFramework.Test", "tests\SonarAnalyzer.TestFramework.Test\SonarAnalyzer.TestFramework.Test.csproj", "{ADBE6CFE-980F-4D4F-8E25-E391581D291E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SonarAnalyzer.TestFramework", "tests\SonarAnalyzer.TestFramework\SonarAnalyzer.TestFramework.csproj", "{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -102,6 +106,14 @@ Global
{DB0A158B-D003-47ED-8209-E70277EB0693}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DB0A158B-D003-47ED-8209-E70277EB0693}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DB0A158B-D003-47ED-8209-E70277EB0693}.Release|Any CPU.Build.0 = Release|Any CPU
{ADBE6CFE-980F-4D4F-8E25-E391581D291E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ADBE6CFE-980F-4D4F-8E25-E391581D291E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ADBE6CFE-980F-4D4F-8E25-E391581D291E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ADBE6CFE-980F-4D4F-8E25-E391581D291E}.Release|Any CPU.Build.0 = Release|Any CPU
{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -115,6 +127,8 @@ Global
{C086048C-D183-4B4D-9D3C-A6E191F19680} = {0C3E0519-DB5C-47C0-ABB3-9D1FB23DFBAF}
{E044950A-098B-4090-B4FB-8D6BD086828B} = {0C3E0519-DB5C-47C0-ABB3-9D1FB23DFBAF}
{DB0A158B-D003-47ED-8209-E70277EB0693} = {B7233F78-E142-4882-B084-7C83BE472109}
{ADBE6CFE-980F-4D4F-8E25-E391581D291E} = {B7233F78-E142-4882-B084-7C83BE472109}
{4C1DB1C4-C1FC-4AA1-B855-0D1948E68FB8} = {B7233F78-E142-4882-B084-7C83BE472109}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4259CA71-C565-42DD-8D58-F59819A11065}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
[assembly: InternalsVisibleTo("SonarAnalyzer.CSharp" + Signing.InternalsVisibleToPublicKey)]
[assembly: InternalsVisibleTo("SonarAnalyzer.VisualBasic" + Signing.InternalsVisibleToPublicKey)]
[assembly: InternalsVisibleTo("SonarAnalyzer.Test" + Signing.InternalsVisibleToPublicKey)]
[assembly: InternalsVisibleTo("SonarAnalyzer.TestFramework" + Signing.InternalsVisibleToPublicKey)]
16 changes: 16 additions & 0 deletions analyzers/tests/SonarAnalyzer.Net8.Test/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,26 @@
"SonarAnalyzer": "[1.0.0, )",
"SonarAnalyzer.CFG": "[1.0.0, )",
"SonarAnalyzer.CSharp": "[1.0.0, )",
"SonarAnalyzer.TestFramework": "[1.0.0, )",
"SonarAnalyzer.VisualBasic": "[1.0.0, )",
"altcover": "[8.6.95, )"
}
},
"sonaranalyzer.testframework": {
"type": "Project",
"dependencies": {
"FluentAssertions": "[6.12.0, )",
"MSTest.TestFramework": "[3.1.1, )",
"Microsoft.Build.Locator": "[1.5.5, )",
"Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.Common": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.MSBuild": "[4.8.0-2.final, )",
"Moq": "[4.18.4, )",
"NuGet.Protocol": "[6.8.0, )",
"SonarAnalyzer": "[1.0.0, )"
}
},
"sonaranalyzer.visualbasic": {
"type": "Project",
"dependencies": {
Expand Down
7 changes: 4 additions & 3 deletions analyzers/tests/SonarAnalyzer.Test/SonarAnalyzer.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<!-- The -windows suffix is needed because SonarAnalyzer.TestFramework references Microsoft.WindowsDesktop.App.WindowsForms framework reference. -->
<TargetFrameworks>net48;net7.0-windows</TargetFrameworks>
<IsPackable>false</IsPackable>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Expand All @@ -13,8 +15,6 @@
- NuGet.Core 2.14.0 (net40-client)
-->
<AssetTargetFallback>$(AssetTargetFallback);net40-client;portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<ProjectGuid>{e11606ca-a186-4fee-ba30-b1688747cd1a}</ProjectGuid>
<TargetFrameworks>net48;net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' != 'net48'">
Expand Down Expand Up @@ -61,6 +61,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SonarAnalyzer.TestFramework\SonarAnalyzer.TestFramework.csproj" />
<ProjectReference Include="..\..\src\SonarAnalyzer.CFG\SonarAnalyzer.CFG.csproj" />
<ProjectReference Include="..\..\src\SonarAnalyzer.Common\SonarAnalyzer.Common.csproj" />
<ProjectReference Include="..\..\src\SonarAnalyzer.CSharp\SonarAnalyzer.CSharp.csproj">
Expand Down
32 changes: 31 additions & 1 deletion analyzers/tests/SonarAnalyzer.Test/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,21 @@
"System.Collections.Immutable": "[1.1.37, )"
}
},
"sonaranalyzer.testframework": {
"type": "Project",
"dependencies": {
"FluentAssertions": "[6.12.0, )",
"MSTest.TestFramework": "[3.1.1, )",
"Microsoft.Build.Locator": "[1.5.5, )",
"Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.Common": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.MSBuild": "[4.8.0-2.final, )",
"Moq": "[4.18.4, )",
"NuGet.Protocol": "[6.8.0, )",
"SonarAnalyzer": "[1.0.0, )"
}
},
"sonaranalyzer.visualbasic": {
"type": "Project",
"dependencies": {
Expand All @@ -445,7 +460,7 @@
}
}
},
"net7.0": {
"net7.0-windows7.0": {
"altcover": {
"type": "Direct",
"requested": "[8.6.95, )",
Expand Down Expand Up @@ -919,6 +934,21 @@
"System.Collections.Immutable": "[1.1.37, )"
}
},
"sonaranalyzer.testframework": {
"type": "Project",
"dependencies": {
"FluentAssertions": "[6.12.0, )",
"MSTest.TestFramework": "[3.1.1, )",
"Microsoft.Build.Locator": "[1.5.5, )",
"Microsoft.CodeAnalysis.CSharp.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.VisualBasic.Workspaces": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.Common": "[4.8.0-2.final, )",
"Microsoft.CodeAnalysis.Workspaces.MSBuild": "[4.8.0-2.final, )",
"Moq": "[4.18.4, )",
"NuGet.Protocol": "[6.8.0, )",
"SonarAnalyzer": "[1.0.0, )"
}
},
"sonaranalyzer.visualbasic": {
"type": "Project",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="altcover" Version="8.6.95" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions.Analyzers" Version="0.23.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\SonarAnalyzer.TestFramework\SonarAnalyzer.TestFramework.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="FluentAssertions" />
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
</ItemGroup>

</Project>
Loading

0 comments on commit 4972c6d

Please sign in to comment.