generated from kritikos-io/templates-dotnet
Compare commits
45 Commits
4633ce5808
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
7eb0f4c6d6
|
|||
|
f462fa7c33
|
|||
|
b2e46fe7a7
|
|||
|
4119b8c82b
|
|||
|
a15f35aeb8
|
|||
|
ab849a8d3b
|
|||
|
50d7e11c16
|
|||
|
df744087d4
|
|||
|
6e9450fbf5
|
|||
|
67801c3795
|
|||
|
250b6fc5ed
|
|||
|
6c3c274de5
|
|||
|
45f6e66174
|
|||
|
5e9b6ab9de
|
|||
|
0fd028eff6
|
|||
|
286d8fdc7e
|
|||
|
6ad3aac084
|
|||
|
09668de51c
|
|||
|
7df22a4413
|
|||
|
37603dedf2
|
|||
|
f3a4c804b7
|
|||
|
02d5746360
|
|||
|
ad61e47a17
|
|||
| 4fdcec1a13 | |||
|
876c09f49f
|
|||
|
c7cfa2b2fc
|
|||
|
f03d4b9e20
|
|||
|
1c7fad5a99
|
|||
|
effd140385
|
|||
|
bc99d28738
|
|||
|
aef9990695
|
|||
|
252595617f
|
|||
|
2a89dc341b
|
|||
|
abf6a1c04a
|
|||
|
bb3cadc731
|
|||
|
1e5caa208f
|
|||
|
4efb21ca1c
|
|||
|
2b6659239d
|
|||
|
384a66e55a
|
|||
|
8002108e5d
|
|||
|
0e65386326
|
|||
|
c12a3a8d5a
|
|||
|
9bab84d53a
|
|||
|
586c92ee49
|
|||
|
5215570111
|
@@ -33,6 +33,7 @@
|
|||||||
<AnalysisLevel>preview</AnalysisLevel>
|
<AnalysisLevel>preview</AnalysisLevel>
|
||||||
<AnalysisMode>All</AnalysisMode>
|
<AnalysisMode>All</AnalysisMode>
|
||||||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
<CodeAnalysisTreatWarningsAsErrors Condition="$(CodeAnalysisTreatWarningsAsErrors) == ''">false</CodeAnalysisTreatWarningsAsErrors>
|
||||||
<!-- Locked mode should only be enabled on CI -->
|
<!-- Locked mode should only be enabled on CI -->
|
||||||
<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</RestoreLockedMode>
|
<RestoreLockedMode Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</RestoreLockedMode>
|
||||||
<!-- Use deterministic builds -->
|
<!-- Use deterministic builds -->
|
||||||
@@ -45,7 +46,7 @@
|
|||||||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||||
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
||||||
<ApplicationVisualStyles>true</ApplicationVisualStyles>
|
<ApplicationVisualStyles>true</ApplicationVisualStyles>
|
||||||
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
|
<EmitCompilerGeneratedFiles>false</EmitCompilerGeneratedFiles>
|
||||||
<GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute>
|
<GenerateRequiresPreviewFeaturesAttribute>False</GenerateRequiresPreviewFeaturesAttribute>
|
||||||
<DefaultItemExcludes>$(DefaultItemExcludes);*.log;*.binlog</DefaultItemExcludes>
|
<DefaultItemExcludes>$(DefaultItemExcludes);*.log;*.binlog</DefaultItemExcludes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -67,18 +68,18 @@
|
|||||||
|
|
||||||
<PropertyGroup Label="Project Assets">
|
<PropertyGroup Label="Project Assets">
|
||||||
<ProjectIcon Condition="Exists('$(MSBuildThisFileDirectory)\icon.png')">
|
<ProjectIcon Condition="Exists('$(MSBuildThisFileDirectory)\icon.png')">
|
||||||
$(MSBuildThisFileDirectory)\icon.png
|
$(MSBuildThisFileDirectory)icon.png
|
||||||
</ProjectIcon>
|
</ProjectIcon>
|
||||||
<ProjectIcon Condition="Exists('$(MSBuildProjectDirectory)\icon.png')">
|
<ProjectIcon Condition="Exists('$(MSBuildProjectDirectory)\icon.png')">
|
||||||
$(MSBuildProjectDirectory)\icon.png
|
$(MSBuildProjectDirectory)icon.png
|
||||||
</ProjectIcon>
|
</ProjectIcon>
|
||||||
<ProjectIconExists Condition="$(ProjectIcon) != ''">true</ProjectIconExists>
|
<ProjectIconExists Condition="$(ProjectIcon) != ''">true</ProjectIconExists>
|
||||||
|
|
||||||
<ProjectReadMe Condition="Exists('$(MSBuildThisFileDirectory)\README.md')">
|
<ProjectReadMe Condition="Exists('$(MSBuildThisFileDirectory)\README.md')">
|
||||||
$(MSBuildThisFileDirectory)\README.md
|
$(MSBuildThisFileDirectory)README.md
|
||||||
</ProjectReadMe>
|
</ProjectReadMe>
|
||||||
<ProjectReadMe Condition="Exists('$(MSBuildProjectDirectory)\README.md')">
|
<ProjectReadMe Condition="Exists('$(MSBuildProjectDirectory)\README.md')">
|
||||||
$(MSBuildProjectDirectory)\README.md
|
$(MSBuildProjectDirectory)README.md
|
||||||
</ProjectReadMe>
|
</ProjectReadMe>
|
||||||
<ProjectReadMeExists Condition="$(ProjectReadMe) != ''">true</ProjectReadMeExists>
|
<ProjectReadMeExists Condition="$(ProjectReadMe) != ''">true</ProjectReadMeExists>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -95,7 +96,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="OpenAPI Analyzers" Condition="'$(UsingMicrosoftNETSdkWeb)' == 'True'">
|
<PropertyGroup Label="OpenAPI Analyzers" Condition="'$(UsingMicrosoftNETSdkWeb)' == 'True'">
|
||||||
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
|
|
||||||
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)/OpenApi</OpenApiDocumentsDirectory>
|
<OpenApiDocumentsDirectory>$(MSBuildProjectDirectory)/OpenApi</OpenApiDocumentsDirectory>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -130,6 +130,7 @@
|
|||||||
<!-- Mark assemblies as CLS compliant so the compiler warns on non compliant usage -->
|
<!-- Mark assemblies as CLS compliant so the compiler warns on non compliant usage -->
|
||||||
<PropertyGroup Condition="$(IsPackable) == 'true'">
|
<PropertyGroup Condition="$(IsPackable) == 'true'">
|
||||||
<ClsCompliant>true</ClsCompliant>
|
<ClsCompliant>true</ClsCompliant>
|
||||||
|
<GenerateSBOM>true</GenerateSBOM>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AssemblyAttribute Include="System.CLSCompliant">
|
<AssemblyAttribute Include="System.CLSCompliant">
|
||||||
@@ -145,13 +146,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Use readme as nuget information -->
|
<!-- Use readme as nuget information -->
|
||||||
<ItemGroup Label="Readme" Condition="$(IsPackable) == 'True' AND $(ProjectReadMe) != ''">
|
<ItemGroup Label="Readme" Condition="$(IsPackable) == 'True' AND $(ProjectReadMeExists) == 'True'">
|
||||||
<None Include="$(ProjectReadMe)" Pack="true" PackagePath="" Visible="true"/>
|
<Content Include="$(ProjectReadMe)" PackagePath="README.md" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Use nuget icon -->
|
<!-- Use nuget icon -->
|
||||||
<ItemGroup Label="Icon" Condition="$(IsPackable) == 'True' AND $(ProjectIconExists) == 'True'">
|
<ItemGroup Label="Icon" Condition="$(IsPackable) == 'True' AND $(ProjectIconExists) == 'True'">
|
||||||
<None Include="$(ProjectIcon)" Pack="true" PackagePath="icon.png" Visible="false"/>
|
<Content Include="$(ProjectIcon)" Pack="true" PackagePath="icon.png" Visible="false"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Uses pretty xUnit configuration -->
|
<!-- Uses pretty xUnit configuration -->
|
||||||
@@ -160,6 +161,12 @@
|
|||||||
<Content Include="$(MSBuildThisFileDirectory)\xunit.runner.json" Link="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
<Content Include="$(MSBuildThisFileDirectory)\xunit.runner.json" Link="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Label="Stylecop Configuration"
|
||||||
|
Condition="Exists('$(MSBuildThisFileDirectory)\stylecop.json')">
|
||||||
|
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\stylecop.json" Link="stylecop.json"
|
||||||
|
CopyToOutputDirectory="Never" Visible="false" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- Project internals are exposed to projects named $(Project).Tests by default -->
|
<!-- Project internals are exposed to projects named $(Project).Tests by default -->
|
||||||
<ItemGroup
|
<ItemGroup
|
||||||
Condition="@(InternalsVisibleToSuffix->Count()) == 0 AND @(InternalsVisibleTo->Count()) == 0">
|
Condition="@(InternalsVisibleToSuffix->Count()) == 0 AND @(InternalsVisibleTo->Count()) == 0">
|
||||||
@@ -200,6 +207,13 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Label="Analyzers">
|
||||||
|
<PackageReference Include="NewStyleCop.Analyzers">
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Label="Test Frameworks" Condition="'$(IsTestProject)' == 'true'">
|
<ItemGroup Label="Test Frameworks" Condition="'$(IsTestProject)' == 'true'">
|
||||||
<PackageReference Include="NSubstitute"/>
|
<PackageReference Include="NSubstitute"/>
|
||||||
<PackageReference Include="NSubstitute.Analyzers.CSharp">
|
<PackageReference Include="NSubstitute.Analyzers.CSharp">
|
||||||
@@ -210,6 +224,7 @@
|
|||||||
|
|
||||||
<ItemGroup Label="SourceLink" Condition="$(IsPackable) == 'true'">
|
<ItemGroup Label="SourceLink" Condition="$(IsPackable) == 'true'">
|
||||||
<SourceLinkGiteaHost Include="git.kritikos.io"/>
|
<SourceLinkGiteaHost Include="git.kritikos.io"/>
|
||||||
|
<PackageReference Include="Microsoft.Sbom.Targets" PrivateAssets="All" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<ItemGroup Label="Packages">
|
<ItemGroup Label="Packages">
|
||||||
<PackageVersion Include="GitVersion.MsBuild" Version="6.4.0" />
|
<PackageVersion Include="GitVersion.MsBuild" Version="6.5.1" />
|
||||||
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="9.0.6" />
|
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.3" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||||
|
<PackageVersion Include="Microsoft.Sbom.Targets" Version="4.1.5" />
|
||||||
|
<PackageVersion Include="NewStyleCop.Analyzers" Version="1.2.1" />
|
||||||
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
|
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
|
||||||
<PackageVersion Include="NSubstitute" Version="5.3.0" />
|
<PackageVersion Include="NSubstitute" Version="5.3.0" />
|
||||||
<PackageVersion Include="xunit.v3" Version="2.0.2" />
|
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
|
||||||
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
|
<PackageVersion Include="xunit.v3" Version="3.2.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -14,15 +14,16 @@
|
|||||||
<File Path="Directory.Packages.props" />
|
<File Path="Directory.Packages.props" />
|
||||||
<File Path="dotnet.ruleset" />
|
<File Path="dotnet.ruleset" />
|
||||||
<File Path="GitVersion.yml" />
|
<File Path="GitVersion.yml" />
|
||||||
|
<File Path="stylecop.json" />
|
||||||
<File Path="xunit.runner.json" />
|
<File Path="xunit.runner.json" />
|
||||||
</Folder>
|
</Folder>
|
||||||
<Folder Name="/samples/">
|
<Folder Name="/samples/">
|
||||||
<File Path="samples\Directory.Build.props" />
|
<File Path="samples\Directory.Build.props" />
|
||||||
</Folder>
|
</Folder>
|
||||||
<Folder Name="/src/">
|
<Folder Name="/src/">
|
||||||
<File Path="src\Directory.build.props" />
|
<File Path="src\Directory.Build.props" />
|
||||||
</Folder>
|
</Folder>
|
||||||
<Folder Name="/tests/">
|
<Folder Name="/tests/">
|
||||||
<File Path="tests\Directory.Build.props" />
|
<File Path="tests\Directory.Build.props" />
|
||||||
</Folder>
|
</Folder>
|
||||||
</Solution>
|
</Solution>
|
||||||
22
dotnet.ruleset
Normal file
22
dotnet.ruleset
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RuleSet Name="Kritikos Ruleset" Description="Common roslyn analyser configuration" ToolsVersion="10.0">
|
||||||
|
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
|
||||||
|
<Rule Id="CS1573" Action="None" />
|
||||||
|
<Rule Id="CS1591" Action="None" />
|
||||||
|
<Rule Id="CS2008" Action="None" />
|
||||||
|
</Rules>
|
||||||
|
<Rules AnalyzerId="Microsoft.CodeQuality.Analyzers" RuleNamespace="Microsoft.CodeQuality.Analyzers">
|
||||||
|
<Rule Id="CA1303" Action="None" />
|
||||||
|
<Rule Id="CA1848" Action="None" />
|
||||||
|
<Rule Id="CA2007" Action="None" />
|
||||||
|
<Rule Id="CA1707" Action="None" />
|
||||||
|
</Rules>
|
||||||
|
<Rules AnalyzerId="SerilogAnalyzer" RuleNamespace="SerilogAnalyzer">
|
||||||
|
<Rule Id="Serilog004" Action="None" />
|
||||||
|
</Rules>
|
||||||
|
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
|
||||||
|
<Rule Id="SA1101" Action="None" />
|
||||||
|
<Rule Id="SA1633" Action="None" />
|
||||||
|
<Rule Id="SA1649" Action="None" />
|
||||||
|
</Rules>
|
||||||
|
</RuleSet>
|
||||||
47
stylecop.json
Normal file
47
stylecop.json
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/bjornhellander/NewStyleCopAnalyzers/refs/heads/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||||
|
"settings": {
|
||||||
|
"indentation": {
|
||||||
|
"useTabs": false,
|
||||||
|
"indentationSize": 2
|
||||||
|
},
|
||||||
|
"orderingRules": {
|
||||||
|
"usingDirectivesPlacement": "outsideNamespace",
|
||||||
|
"systemUsingDirectivesFirst": true,
|
||||||
|
"blankLinesBetweenUsingGroups": "require",
|
||||||
|
"elementOrder": [
|
||||||
|
"kind",
|
||||||
|
"accessibility",
|
||||||
|
"constant",
|
||||||
|
"static",
|
||||||
|
"readonly"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"maintainabilityRules": {
|
||||||
|
"topLevelTypes": [
|
||||||
|
"class",
|
||||||
|
"interface",
|
||||||
|
"struct",
|
||||||
|
"enum"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"namingRules": {
|
||||||
|
"allowCommonHungarianPrefixes": false,
|
||||||
|
"includeInferredTupleElementNames": true,
|
||||||
|
"tupleElementNameCasing": "PascalCase"
|
||||||
|
},
|
||||||
|
"layoutRules": {
|
||||||
|
"newlineAtEndOfFile": "require",
|
||||||
|
"allowConsecutiveUsings": false,
|
||||||
|
"allowDoWhileOnClosingBrace": true
|
||||||
|
},
|
||||||
|
"readabilityRules": {
|
||||||
|
"allowBuiltInTypeAliases": false
|
||||||
|
},
|
||||||
|
"documentationRules": {
|
||||||
|
"documentExposedElements": true,
|
||||||
|
"documentationCulture": "en-US",
|
||||||
|
"documentInterfaces": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user