feat(Directory.Build.props): add TreatWarningsAsErrors property to enforce strict code quality standards

This commit is contained in:
Jean Gatto
2023-07-18 11:19:19 -03:00
parent 55ed112538
commit 51d85f0fcd
+5 -1
View File
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup Label="Build">
<Authors>Jean Gatto</Authors>
<Authors>Jean Gatto (@jeangatto)</Authors>
<MaintainerEmail>jean_gatto@hotmail.com</MaintainerEmail>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/jeangatto/ASP.NET-Core-API-CQRS-EVENT-DDD-SOLID</RepositoryUrl>
@@ -18,10 +18,14 @@
<AnalysisLevel>latest</AnalysisLevel>
<!-- Enable .NET analyzers -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<!-- Any warning message generated by the compiler will cause the build process to fail. -->
<!-- This can be useful to enforce strict code quality standards and ensure that all warnings are addressed before deploying the code. -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Enabling Build Acceleration can reduce incremental build times by up to 80% for SDK-style .NET projects. -->
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<!-- CS1591: Missing XML Comment Warning -->
<NoWarn>$(NoWarn);1591</NoWarn>
<!-- The ContinuousIntegrationBuild property indicates whether a build is executing on a continuous integration (CI) server. -->
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>