-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: adopt same code conventions as kafkaflow (#145)
* refactor: file scoped namespaces * refactor:global usings * refactor: use _ as private field prefix * refactor: move test projects to tests folder * refactor: move sln to root * refactor: cleanup testing warnings * refactor: cleanup and reformat code * refactor: update gh actions workflows * refactor: apply codacy suggestions
- Loading branch information
Gui Ferreira
authored
Jan 31, 2024
1 parent
9ee2ed2
commit 5118125
Showing
577 changed files
with
20,074 additions
and
20,132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# editorconfig.org | ||
|
||
[*.cs] | ||
# Naming rules for fields | ||
dotnet_naming_rule.private_fields_with_underscore.symbols = private_field | ||
dotnet_naming_rule.private_fields_with_underscore.style = prefix_underscore | ||
dotnet_naming_rule.private_fields_with_underscore.severity = warning | ||
|
||
dotnet_naming_symbols.private_field.applicable_kinds = field | ||
dotnet_naming_symbols.private_field.applicable_accessibilities = private | ||
dotnet_naming_symbols.private_field.required_modifiers = | ||
|
||
dotnet_naming_style.prefix_underscore.capitalization = camel_case | ||
dotnet_naming_style.prefix_underscore.required_prefix = _ | ||
|
||
# Naming rules for properties | ||
dotnet_naming_rule.private_properties_with_underscore.symbols = private_property | ||
dotnet_naming_rule.private_properties_with_underscore.style = prefix_underscore | ||
dotnet_naming_rule.private_properties_with_underscore.severity = warning | ||
|
||
dotnet_naming_symbols.private_property.applicable_kinds = property | ||
dotnet_naming_symbols.private_property.applicable_accessibilities = private | ||
dotnet_naming_symbols.private_property.required_modifiers = | ||
|
||
dotnet_naming_style.prefix_underscore.capitalization = camel_case | ||
dotnet_naming_style.prefix_underscore.required_prefix = _ | ||
|
||
# Do not use 'this.' for private fields | ||
dotnet_diagnostic.DOTNET_Naming_Style_DoNotUseThisForPrivateFields.severity = warning | ||
dotnet_diagnostic.DOTNET_Naming_Style_DoNotUseThisForPrivateFields.symbols = field_like | ||
|
||
dotnet_diagnostic.CA2007.severity = none | ||
dotnet_diagnostic.CS1591.severity = none | ||
|
||
dotnet_naming_rule.style_dotnet_naming_rule_DotNetNamingStyle.DoNotUseThisForPrivateFields.symbols = field_like | ||
dotnet_naming_rule.style_dotnet_naming_rule_DotNetNamingStyle.DoNotUseThisForPrivateFields.style = this_prefix | ||
dotnet_naming_rule.style_dotnet_naming_rule_DotNetNamingStyle.DoNotUseThisForPrivateFields.severity = warning | ||
|
||
# name all constant fields using PascalCase | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields | ||
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style | ||
|
||
dotnet_naming_symbols.constant_fields.applicable_kinds = field | ||
dotnet_naming_symbols.constant_fields.required_modifiers = const | ||
|
||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
|
||
# static fields should have s_ prefix | ||
dotnet_naming_rule.static_fields_should_have_prefix.severity = warning | ||
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields | ||
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style | ||
|
||
dotnet_naming_symbols.static_fields.applicable_kinds = field | ||
dotnet_naming_symbols.static_fields.required_modifiers = static | ||
|
||
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected | ||
dotnet_naming_style.static_prefix_style.required_prefix = s_ | ||
|
||
dotnet_naming_style.static_prefix_style.capitalization = camel_case | ||
|
||
csharp_indent_labels = one_less_than_current | ||
csharp_using_directive_placement = outside_namespace:silent | ||
csharp_prefer_simple_using_statement = true:suggestion | ||
csharp_prefer_braces = true:silent | ||
csharp_style_namespace_declarations = block_scoped:silent | ||
csharp_style_namespace_declarations = file_scoped:error | ||
csharp_style_prefer_method_group_conversion = true:silent | ||
csharp_style_prefer_top_level_statements = true:silent | ||
csharp_style_prefer_primary_constructors = true:suggestion | ||
csharp_style_expression_bodied_methods = false:silent | ||
csharp_style_expression_bodied_constructors = false:silent | ||
csharp_style_expression_bodied_operators = false:silent | ||
csharp_style_expression_bodied_properties = true:silent | ||
csharp_style_expression_bodied_indexers = true:silent | ||
csharp_style_expression_bodied_accessors = true:silent | ||
csharp_style_expression_bodied_lambdas = true:silent | ||
csharp_style_expression_bodied_local_functions = false:silent | ||
|
||
[*.{cs,vb}] | ||
dotnet_style_operator_placement_when_wrapping = beginning_of_line | ||
tab_width = 4 | ||
indent_size = 4 | ||
end_of_line = crlf | ||
dotnet_style_coalesce_expression = true:suggestion | ||
dotnet_style_null_propagation = true:suggestion | ||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion | ||
dotnet_style_prefer_auto_properties = true:silent | ||
dotnet_style_object_initializer = true:suggestion | ||
dotnet_style_prefer_collection_expression = true:suggestion | ||
dotnet_style_collection_initializer = true:suggestion | ||
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion | ||
dotnet_style_prefer_conditional_expression_over_assignment = true:silent | ||
dotnet_style_prefer_conditional_expression_over_return = true:silent | ||
dotnet_style_explicit_tuple_names = true:suggestion | ||
dotnet_style_prefer_inferred_tuple_names = true:suggestion | ||
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion | ||
dotnet_style_prefer_compound_assignment = true:suggestion | ||
dotnet_style_prefer_simplified_interpolation = true:suggestion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<LangVersion>10.0</LangVersion> | ||
<PackageIconUrl>https://raw.githubusercontent.com/Farfetch/.github/master/images/fuse-logo-128.png</PackageIconUrl> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Hosting; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace KafkaFlow.Retry.API.Sample | ||
namespace KafkaFlow.Retry.API.Sample; | ||
|
||
public class Program | ||
{ | ||
public class Program | ||
public static void Main(string[] args) | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
CreateHostBuilder(args).Build().Run(); | ||
} | ||
|
||
public static IHostBuilder CreateHostBuilder(string[] args) => | ||
Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => | ||
{ | ||
webBuilder.UseStartup<Startup>(); | ||
}); | ||
public static IHostBuilder CreateHostBuilder(string[] args) | ||
{ | ||
return Host.CreateDefaultBuilder(args) | ||
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); }); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.