Skip to content

Commit ad74a25

Browse files
authored
Merge pull request #804 from adamralph/top-level-warning-suppressions
move top level warning suppressions to <NoWarn>
2 parents ced9d01 + 78740aa commit ad74a25

7 files changed

Lines changed: 22 additions & 27 deletions

File tree

.globalconfig

Lines changed: 0 additions & 6 deletions
This file was deleted.

Directory.Build.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
<EnableNETAnalyzers>true</EnableNETAnalyzers>
77
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
88
<ImplicitUsings>enable</ImplicitUsings>
9-
<NoWarn>$(NoWarn);EnableGenerateDocumentationFile</NoWarn> <!-- workaround for https://github.com/dotnet/roslyn/issues/41640 -->
109
<Nullable>enable</Nullable>
1110
<RestoreLockedMode Condition="'$(CI)' != ''">true</RestoreLockedMode>
1211
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
1312
</PropertyGroup>
1413

14+
<PropertyGroup>
15+
<NoWarn>$(NoWarn);EnableGenerateDocumentationFile</NoWarn> <!-- workaround for https://github.com/dotnet/roslyn/issues/41640 -->
16+
<NoWarn>$(NoWarn);CA1014</NoWarn> <!-- Mark assemblies with CLSCompliantAttribute -->
17+
</PropertyGroup>
18+
1519
<PropertyGroup Condition="'$(Configuration)'=='Release'">
1620
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1721
</PropertyGroup>

SimpleExec/SimpleExec.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
<Description>A .NET library, developed by humans, for running external commands.</Description>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
88
<IsPackable>true</IsPackable>
9-
<NoWarn>$(NoWarn);RS0016</NoWarn> <!-- Add public types and members to the declared API -->
10-
<NoWarn>$(NoWarn);RS0037</NoWarn> <!-- Enable tracking of nullability of reference types in the declared API -->
119
<PackageIcon>simple-exec.png</PackageIcon>
1210
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
1311
<PackageProjectUrl>https://github.com/adamralph/simple-exec</PackageProjectUrl>
@@ -16,6 +14,11 @@
1614
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
1715
</PropertyGroup>
1816

17+
<PropertyGroup>
18+
<NoWarn>$(NoWarn);RS0016</NoWarn> <!-- Add public types and members to the declared API -->
19+
<NoWarn>$(NoWarn);RS0037</NoWarn> <!-- Enable tracking of nullability of reference types in the declared API -->
20+
</PropertyGroup>
21+
1922
<PropertyGroup Condition="'$(Configuration)'=='Release'">
2023
<GenerateSBOM>true</GenerateSBOM>
2124
</PropertyGroup>

SimpleExecTests/.editorconfig

Lines changed: 0 additions & 10 deletions
This file was deleted.

SimpleExecTests/SimpleExecTests.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<NoWarn>$(NoWarn);CA1515</NoWarn> <!-- Consider making public types internal - https://github.com/dotnet/roslyn-analyzers/issues/7192 -->
54
<OutputType>Exe</OutputType>
65
<RollForward>major</RollForward>
76
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
87
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
98
</PropertyGroup>
109

10+
<PropertyGroup>
11+
<NoWarn>$(NoWarn);CA1515</NoWarn> <!-- Consider making public types internal - https://github.com/dotnet/roslyn-analyzers/issues/7192 -->
12+
<NoWarn>$(NoWarn);CA2007</NoWarn> <!-- Do not directly await a Task -->
13+
<NoWarn>$(NoWarn);VSTHRD111</NoWarn> <!-- Add .ConfigureAwait(bool) to your await expression -->
14+
<NoWarn>$(NoWarn);VSTHRD200</NoWarn> <!-- Use "Async" suffix in names of methods that return an awaitable type -->
15+
</PropertyGroup>
16+
1117
<ItemGroup>
1218
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" />
1319
<PackageReference Include="Microsoft.Testing.Platform" Version="2.0.2" />

targets/.editorconfig

Lines changed: 0 additions & 7 deletions
This file was deleted.

targets/Targets.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
<TargetFramework>net10.0</TargetFramework>
77
</PropertyGroup>
88

9+
<PropertyGroup>
10+
<NoWarn>$(NoWarn);CA2007</NoWarn> <!-- Do not directly await a Task -->
11+
<NoWarn>$(NoWarn);VSTHRD111</NoWarn> <!-- Add .ConfigureAwait(bool) to your await expression -->
12+
</PropertyGroup>
13+
914
<ItemGroup>
1015
<PackageReference Include="Bullseye" Version="6.1.0" />
1116
</ItemGroup>

0 commit comments

Comments
 (0)