Skip to content

Commit

Permalink
Make C# build fail in case of nullability warnings (#690)
Browse files Browse the repository at this point in the history
* chore: make compiler treat nullability warnings as errors

* chore: add more warnings
  • Loading branch information
tnotheis authored Jun 11, 2024
1 parent 712e768 commit 8f29142
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@
<AssemblyName>Backbone.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(AssemblyName.Replace(" ", "_"))</RootNamespace>
<Nullable>enable</Nullable>
<WarningsAsErrors>
CS8597,CS8600,CS8601,CS8602,CS8603,CS8604,CS8605,CS8607,CS8608,CS8609,CS8610,CS8611,CS8612,CS8613,CS8614,CS8615,
CS8616,CS8617,CS8618,CS8619,CS8620,CS8621,CS8622,CS8624,CS8625,CS8629,CS8631,CS8633,CS8634,CS8643,CS8644,CS8645,
CS8655,CS8667,CS8670,CS8714,CS8762,CS8763,CS8764,CS8765,CS8766,CS8767,CS8768,CS8769,CS8770,CS8774,CS8776,CS8775,
CS8777,CS8819,CS8824,CS8825,CS8847
</WarningsAsErrors>
</PropertyGroup>
</Project>
6 changes: 6 additions & 0 deletions Modules/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@
<AssemblyName>Backbone.Modules.$(MSBuildProjectName)</AssemblyName>
<RootNamespace>$(AssemblyName.Replace(" ", "_"))</RootNamespace>
<Nullable>enable</Nullable>
<WarningsAsErrors>
CS8597,CS8600,CS8601,CS8602,CS8603,CS8604,CS8605,CS8607,CS8608,CS8609,CS8610,CS8611,CS8612,CS8613,CS8614,CS8615,
CS8616,CS8617,CS8618,CS8619,CS8620,CS8621,CS8622,CS8624,CS8625,CS8629,CS8631,CS8633,CS8634,CS8643,CS8644,CS8645,
CS8655,CS8667,CS8670,CS8714,CS8762,CS8763,CS8764,CS8765,CS8766,CS8767,CS8768,CS8769,CS8770,CS8774,CS8776,CS8775,
CS8777,CS8819,CS8824,CS8825,CS8847
</WarningsAsErrors>
</PropertyGroup>
</Project>

0 comments on commit 8f29142

Please sign in to comment.