From bd3f7232a974fc30ec9bf331c8e92540ec1649e1 Mon Sep 17 00:00:00 2001 From: Kamyab7 Date: Sun, 28 Jan 2024 17:24:50 +0330 Subject: [PATCH] enforce async method naming --- .editorconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.editorconfig b/.editorconfig index cd17d14..4ac8d17 100644 --- a/.editorconfig +++ b/.editorconfig @@ -96,6 +96,26 @@ csharp_style_throw_expression = true:suggestion csharp_style_conditional_delegate_call = true:suggestion # Modifier preferences csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.suffix_async_should_be_asyncsuffix.severity = error #suggestion +dotnet_naming_rule.suffix_async_should_be_asyncsuffix.symbols = suffix_async +dotnet_naming_rule.suffix_async_should_be_asyncsuffix.style = asyncsuffix + +# Symbol specifications + +dotnet_naming_symbols.suffix_async.applicable_kinds = method +dotnet_naming_symbols.suffix_async.applicable_accessibilities = * +dotnet_naming_symbols.suffix_async.required_modifiers = async + +# Naming styles + +dotnet_naming_style.asyncsuffix.required_prefix = +dotnet_naming_style.asyncsuffix.required_suffix = Async +dotnet_naming_style.asyncsuffix.word_separator = +dotnet_naming_style.asyncsuffix.capitalization = pascal_case # Expression-level preferences csharp_prefer_braces = true:silent csharp_style_deconstructed_variable_declaration = true:suggestion