Skip to content

Commit

Permalink
Update .editorconfig
Browse files Browse the repository at this point in the history
Add some new styles from newer C# idioms
  • Loading branch information
kzu authored Mar 15, 2023
1 parent 543f7da commit 2981836
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error
dotnet_diagnostic.IDE0040.severity = error

[*.cs]
# Top-level files are definitely OK
csharp_using_directive_placement = outside_namespace:silent
csharp_style_namespace_declarations = block_scoped:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent

# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
Expand Down Expand Up @@ -93,5 +99,8 @@ csharp_new_line_before_members_in_anonymous_types = true
# xUnit1013: Public method should be marked as test. Allows using records as test classes
dotnet_diagnostic.xUnit1013.severity = none

# Default severity for analyzer diagnostics with category 'Style'
dotnet_analyzer_diagnostic.category-Style.severity = none

# VSTHRD200: Use "Async" suffix for async methods
dotnet_diagnostic.VSTHRD200.severity = none

0 comments on commit 2981836

Please sign in to comment.