Skip to content

Commit

Permalink
Remove CS1591 nowarn from concrete test projects as this is already d…
Browse files Browse the repository at this point in the history
…efined in the Directory.Build.props that is in the test folder.
  • Loading branch information
drieseng committed Oct 13, 2023
1 parent 1cc6846 commit 20f4bc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 48 deletions.
11 changes: 0 additions & 11 deletions test/Renci.SshNet.Benchmarks/Renci.SshNet.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!--
Even though we're not interested in producing XML docs for test projects, we have to enable this in order to have the .NET Compiler
Platform analyzers produce the IDE0005 (Remove unnecessary import) diagnostic.
To avoid warnings for missing XML docs, we add CS1591 (Missing XML comment for publicly visible type or member) to the NoWarn property.
We can stop producing XML docs for test projects (and remove the NoWarn for CS1591) once the following issue is fixed:
https://github.com/dotnet/roslyn/issues/41640.
-->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -27,5 +17,4 @@
<ItemGroup>
<EmbeddedResource Include="..\Data\*.txt" LinkBase="Data" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<!--
Even though we're not interested in producing XML docs for test projects, we have to enable this in order to have the .NET Compiler
Platform analyzers produce the IDE0005 (Remove unnecessary import) diagnostic.
To avoid warnings for missing XML docs, we add CS1591 (Missing XML comment for publicly visible type or member) to the NoWarn property.
We can stop producing XML docs for test projects (and remove the NoWarn for CS1591) once the following issue is fixed:
https://github.com/dotnet/roslyn/issues/41640.
-->
<NoWarn>$(NoWarn);CS1591;SYSLIB0021;SYSLIB1045;SYSLIB0014;IDE0220;IDE0010</NoWarn>

<NoWarn>$(NoWarn);SYSLIB0021;SYSLIB1045;SYSLIB0014;IDE0220;IDE0010</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
Expand All @@ -27,7 +16,6 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />

<PackageReference Include="Testcontainers" Version="3.4.0" />
<PackageReference Include="System.Management" Version="4.7.0" />
<!--
Expand All @@ -40,7 +28,6 @@
To fix, we explicitly exclude the SSH.NET nuget package from this project's dependencies.
-->
<PackageReference Include="SSH.NET" Version="2020.0.2" ExcludeAssets="All" />

<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand All @@ -51,6 +38,7 @@
<ProjectReference Include="..\Renci.SshNet.TestTools.OpenSSH\Renci.SshNet.TestTools.OpenSSH.csproj" />
<ProjectReference Include="..\..\src\Renci.SshNet\Renci.SshNet.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="resources\client\id_dsa" />
<EmbeddedResource Include="resources\client\id_dsa.ppk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!--
Even though we're not interested in producing XML docs for test projects, we have to enable this in order to have the .NET Compiler
Platform analyzers produce the IDE0005 (Remove unnecessary import) diagnostic.
To avoid warnings for missing XML docs, we add CS1591 (Missing XML comment for publicly visible type or member) to the NoWarn property.
We can stop producing XML docs for test projects (and remove the NoWarn for CS1591) once the following issue is fixed:
https://github.com/dotnet/roslyn/issues/41640.
-->
<NoWarn>$(NoWarn);CS1591;SYSLIB0021;SYSLIB1045</NoWarn>
<NoWarn>$(NoWarn);SYSLIB0021;SYSLIB1045</NoWarn>
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Compile Remove="Properties\**" />
<EmbeddedResource Remove="Properties\**" />
<None Remove="Properties\**" />
</ItemGroup>
</Project>
12 changes: 1 addition & 11 deletions test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<!--
Even though we're not interested in producing XML docs for test projects, we have to enable this in order to have the .NET Compiler
Platform analyzers produce the IDE0005 (Remove unnecessary import) diagnostic.
To avoid warnings for missing XML docs, we add CS1591 (Missing XML comment for publicly visible type or member) to the NoWarn property.
We can stop producing XML docs for test projects (and remove the NoWarn for CS1591) once the following issue is fixed:
https://github.com/dotnet/roslyn/issues/41640.
-->
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -32,13 +22,13 @@
<MSTestV1UnitTestFrameworkAssembly Condition="'$(MSTestV1UnitTestFrameworkAssembly)' == '' and Exists('$(MSTestV1UnitTestFrameworkAssemblyCandidate)')">$(MSTestV1UnitTestFrameworkAssemblyCandidate)</MSTestV1UnitTestFrameworkAssembly>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
<PackageReference Include="Moq" Version="4.18.4" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Renci.SshNet\Renci.SshNet.csproj" />
</ItemGroup>
Expand Down

0 comments on commit 20f4bc1

Please sign in to comment.