Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Test tweaks and more properties #15

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions connorjs-analyzers/build/connorjs-analyzers.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,31 @@
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
</ItemGroup>

<!-- MSBuild properties (for .NET) -->
<!-- https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props -->
<PropertyGroup>
<!-- MSBuild properties (for .NET) -->
<!-- https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props -->

<!-- Build related -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!-- Code analysis -->
<AnalysisMode>Recommended</AnalysisMode>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers> <!-- Defaults to true in .NET 5+ -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>

<!-- C# compiler options -->
<!-- https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/ -->
<PropertyGroup>
<!-- Reference -->
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences> <!-- Prefer explicit dependencies -->

<!-- Code generation -->
<ImplicitUsings>disable</ImplicitUsings> <!-- Prefer explicit usings -->

<!-- C# compiler options -->
<!-- https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/ -->

<!-- Language -->
<Nullable>enable</Nullable>

<!-- Errors and warnings -->
<!--
1. Default all warns to errors (`TreatWarningsAsErrors`).
Expand All @@ -29,5 +41,19 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors />
<NoWarn />

<!-- Code generation -->
<Deterministic>true</Deterministic>
</PropertyGroup>

<!-- Overrides for test projects -->
<PropertyGroup Condition="$(IsTestProject)">
<!-- Test projects do not generate documentation -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>

<!-- Disable these for test projects
- SA0001, SA1600: Documentation-related
-->
<NoWarn>SA0001,SA1600,$(NoWarn)</NoWarn>
</PropertyGroup>
</Project>