Skip to content

Instantly share code, notes, and snippets.

@disouzam
Forked from MelbourneDeveloper/.editorconfig
Created January 29, 2024 10:25
Show Gist options
  • Save disouzam/c26b44114a483034260bf2ede85661e1 to your computer and use it in GitHub Desktop.
Save disouzam/c26b44114a483034260bf2ede85661e1 to your computer and use it in GitHub Desktop.
Directory.Build.props Enable All Errors
[*.{cs,vb}]
dotnet_diagnostic.CA1062.severity = none
# IDE0022: Use block body for method
csharp_style_expression_bodied_methods = true
# IDE0032: Use auto property
dotnet_style_prefer_auto_properties = true
#CSharpier Incompatible Rules
dotnet_diagnostic.SA1009.severity = none
dotnet_diagnostic.SA1111.severity = none
dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1502.severity = none
#Don't like these
dotnet_diagnostic.SA1512.severity = none
dotnet_diagnostic.SA1623.severity = none
dotnet_diagnostic.SA1515.severity = none
dotnet_diagnostic.SA1516.severity = none
#Not sure why this is necessary
dotnet_diagnostic.CA1016.severity = none
#What's the recommendation these days?
dotnet_diagnostic.SA1309.severity = none
dotnet_diagnostic.SA1101.severity = none
#Too onerous
dotnet_diagnostic.SA1615.severity = none
dotnet_diagnostic.SA1600.severity = none
dotnet_diagnostic.SA1611.severity = none
#This is an analyzer bug when using records
dotnet_diagnostic.SA1313.severity = none
#This also seems to be a bug when using array initializers
dotnet_diagnostic.SA1010.severity = none
dotnet_diagnostic.SA1011.severity = none
# IDE0040: Add accessibility modifiers
dotnet_style_require_accessibility_modifiers = never
<Project>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<WarningsNotAsErrors></WarningsNotAsErrors>
<Deterministic>true</Deterministic>
<LangVersion>Latest</LangVersion>
<DebugSymbols>true</DebugSymbols>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>true</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzers>true</RunAnalyzers>
<Nullable>enable</Nullable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118"/>
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment