-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.props
90 lines (78 loc) · 4.87 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<PropertyGroup Label="Runtime Info">
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup Label="Code analysis properties">
<!--https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#code-analysis-properties-->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>Recommended</AnalysisMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<!-- IDE0100: Remove redundant equality (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0100) -->
<!-- IDE0290: Use primary constructor (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0290) -->
<!-- IDE0028: Collection initialization can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0028) -->
<!-- IDE0300: Collection initialization can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0300) -->
<!-- IDE0301: Collection initialization can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0301) -->
<!-- IDE0305: Collection initialization can be simplified (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0305) -->
<!-- WarningsNotAsErrors -->
<NoWarn>$(NoWarn);IDE0290;IDE0100;IDE0028;IDE0300;IDE0301;IDE0305</NoWarn>
<!-- CSC : error EnableGenerateDocumentationFile: Set MSBuild property 'GenerateDocumentationFile' to 'true' in project file to enable IDE0005 (Remove unnecessary usings/imports) on build (https://github.com/dotnet/roslyn/issues/41640) -->
<NoWarn>$(NoWarn);IDE0005</NoWarn>
</PropertyGroup>
<PropertyGroup>
<Authors>Max Hamulyák</Authors>
<Company>Kaylumah</Company>
<!-- <Copyright>Copyright © $(Company) $([System.DateTime]::Now.Year)</Copyright> -->
<CopyrightKaylumah>© $(Company). All rights reserved.</CopyrightKaylumah>
<Copyright>$(CopyrightKaylumah)</Copyright>
</PropertyGroup>
<PropertyGroup>
<!-- source-link -->
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>
<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<!--<Using Include="Microsoft.Extensions.Configuration" />-->
<!--<Using Include="Microsoft.Extensions.DependencyInjection" />-->
<!--<Using Include="Microsoft.Extensions.Logging" />-->
</ItemGroup>
<PropertyGroup Label="BannedApiAnalyzers">
<!-- https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md -->
<EnableBannedApiAnalyzers>false</EnableBannedApiAnalyzers>
<EnableBannedApiAnalyzers Condition="'$(MSBuildProjectExtension)'=='.csproj'">true</EnableBannedApiAnalyzers>
<BannedSymbolsFullPath>$(MSBuildThisFileDirectory)BannedSymbols.txt</BannedSymbolsFullPath>
</PropertyGroup>
<!-- <PropertyGroup Label="ContinuousIntegrationBuild" Condition="'$(CI)' == ''">
<CI>false</CI>
</PropertyGroup> -->
<PropertyGroup Label="IDesignAnalyzers">
<EnableIDesignAnalyzers>false</EnableIDesignAnalyzers>
<EnableIDesignAnalyzers Condition="'$(MSBuildProjectExtension)'=='.csproj'">true</EnableIDesignAnalyzers>
<UsingAnalyzerFullPath>$(MSBuildThisFileDirectory)UsingAnalyzer.txt</UsingAnalyzerFullPath>
<!--
- Analyzers warnings follow the format IDESIGN***
- to ignore warning add to NoWarn
- to keep warning but not fail the build
-->
<NoWarn>$(NoWarn);</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);</WarningsNotAsErrors>
</PropertyGroup>
<PropertyGroup Label="SonarAnalyzers">
<EnableSonarAnalyzers>false</EnableSonarAnalyzers>
<EnableSonarAnalyzers Condition="'$(MSBuildProjectExtension)'=='.csproj'">false</EnableSonarAnalyzers>
<!-- do not force current sonar violations to fail the build! -->
<!-- https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings -->
<WarningsNotAsErrors>$(WarningsNotAsErrors);S125;S1066;S1118;S1135;S1144;S1172;S1481;S1905;S2094;S2259;S2365;S2589;S2699;S2737;S3267;S3400;S3881;S3925;S4136;S4487;S6602;S6605;S6608</WarningsNotAsErrors>
</PropertyGroup>
<PropertyGroup>
<RunSettingsFilePath>$(MSBuildThisFileDirectory).runsettings</RunSettingsFilePath>
</PropertyGroup>
<PropertyGroup>
<RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>
</PropertyGroup>
</Project>