Skip to content

Commit

Permalink
Cleanup analyzers and StyleCop config, enable builtint .NET static an…
Browse files Browse the repository at this point in the history
…alysis (#641)
  • Loading branch information
martinothamar authored May 14, 2024
1 parent e60b72c commit d228eaf
Show file tree
Hide file tree
Showing 42 changed files with 140 additions and 654 deletions.
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ max_line_length = 160
end_of_line = crlf
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion

[*.cs]
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
Expand All @@ -91,6 +90,18 @@ csharp_style_expression_bodied_local_functions = false:silent
csharp_indent_labels = one_less_than_current
csharp_style_prefer_primary_constructors = false:suggestion

# CA1848: Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = none

# CA1727: Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = suggestion

# CA2254: Template should be a static expression
dotnet_diagnostic.CA2254.severity = none

# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = suggestion

[Program.cs]
dotnet_diagnostic.CA1050.severity = none
dotnet_diagnostic.S1118.severity = none
177 changes: 0 additions & 177 deletions Altinn3.ruleset

This file was deleted.

4 changes: 4 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

<PropertyGroup>
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Minimum</AnalysisMode>
<Features>strict</Features>
<!-- <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors> -->
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit d228eaf

Please sign in to comment.