Skip to content

Commit

Permalink
Enable TreatWarningsAsErrors
Browse files Browse the repository at this point in the history
Enable TreatWarningsAsErrors in Directory.Build.props.
Exception is CS8981 (lowercase type names) in GrpcClient and
GrpcService projects because it is triggered by auto-generated
protobuf types.
  • Loading branch information
webwarrior-ws committed Feb 15, 2024
1 parent 711d832 commit 55f3266
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions src/FX.GrpcClient/FX.GrpcClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!-- CS8981 is triggered by auto-generated protobuf types -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS8981</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/FX.GrpcService/FX.GrpcService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- CS8981 is triggered by auto-generated protobuf types -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS8981</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 55f3266

Please sign in to comment.