82 lines
3.3 KiB
INI
82 lines
3.3 KiB
INI
root = true
|
|
|
|
[*]
|
|
charset = utf-8
|
|
indent_style = space
|
|
indent_size = 4
|
|
insert_final_newline = true
|
|
trim_trailing_whitespace = true
|
|
|
|
[*.{json,props,csproj,slnx,yml,yaml,md}]
|
|
indent_size = 2
|
|
|
|
[*.cs]
|
|
csharp_new_line_before_open_brace = all
|
|
csharp_new_line_before_else = true
|
|
csharp_new_line_before_catch = true
|
|
csharp_new_line_before_finally = true
|
|
csharp_prefer_braces = true:warning
|
|
csharp_style_namespace_declarations = file_scoped:warning
|
|
csharp_using_directive_placement = outside_namespace:warning
|
|
dotnet_sort_system_directives_first = true
|
|
dotnet_separate_import_directive_groups = false
|
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members:warning
|
|
dotnet_style_qualification_for_field = false:warning
|
|
dotnet_style_qualification_for_method = false:warning
|
|
dotnet_style_qualification_for_property = false:warning
|
|
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
|
|
dotnet_style_predefined_type_for_member_access = true:warning
|
|
|
|
# 命名:私有/内部实例字段 _camelCase,静态字段 s_camelCase,线程静态 t_camelCase
|
|
dotnet_naming_rule.static_fields.symbols = static_fields
|
|
dotnet_naming_rule.static_fields.style = s_camel
|
|
dotnet_naming_rule.static_fields.severity = warning
|
|
dotnet_naming_symbols.static_fields.applicable_kinds = field
|
|
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
|
|
dotnet_naming_symbols.static_fields.required_modifiers = static
|
|
|
|
dotnet_naming_rule.private_instance_fields.symbols = private_instance_fields
|
|
dotnet_naming_rule.private_instance_fields.style = underscore_camel
|
|
dotnet_naming_rule.private_instance_fields.severity = warning
|
|
dotnet_naming_symbols.private_instance_fields.applicable_kinds = field
|
|
dotnet_naming_symbols.private_instance_fields.applicable_accessibilities = private, internal, private_protected
|
|
|
|
dotnet_naming_rule.interfaces.symbols = interfaces
|
|
dotnet_naming_rule.interfaces.style = i_pascal
|
|
dotnet_naming_rule.interfaces.severity = warning
|
|
dotnet_naming_symbols.interfaces.applicable_kinds = interface
|
|
|
|
dotnet_naming_style.underscore_camel.required_prefix = _
|
|
dotnet_naming_style.underscore_camel.capitalization = camel_case
|
|
dotnet_naming_style.s_camel.required_prefix = s_
|
|
dotnet_naming_style.s_camel.capitalization = camel_case
|
|
dotnet_naming_style.i_pascal.required_prefix = I
|
|
dotnet_naming_style.i_pascal.capitalization = pascal_case
|
|
|
|
# 对本项目不适用的建议规则
|
|
dotnet_diagnostic.CA1707.severity = none
|
|
dotnet_diagnostic.CA1716.severity = none
|
|
dotnet_diagnostic.CA1819.severity = none
|
|
dotnet_diagnostic.CA2007.severity = none
|
|
dotnet_diagnostic.CA1305.severity = none
|
|
dotnet_diagnostic.CA1308.severity = none
|
|
dotnet_diagnostic.CA1002.severity = none
|
|
dotnet_diagnostic.CA1000.severity = none
|
|
dotnet_diagnostic.CA1034.severity = none
|
|
dotnet_diagnostic.CA1062.severity = none
|
|
dotnet_diagnostic.CA1031.severity = none
|
|
dotnet_diagnostic.CA1848.severity = none
|
|
dotnet_diagnostic.CA2201.severity = none
|
|
dotnet_diagnostic.CA1861.severity = none
|
|
dotnet_diagnostic.CA1812.severity = none
|
|
dotnet_diagnostic.CA1805.severity = none
|
|
dotnet_diagnostic.CA1822.severity = suggestion
|
|
dotnet_diagnostic.IDE0005.severity = none
|
|
dotnet_diagnostic.IDE0058.severity = none
|
|
dotnet_diagnostic.CA1720.severity = none
|
|
dotnet_diagnostic.CA1711.severity = none
|
|
|
|
[{**/tests/**.cs,tests/**.cs}]
|
|
dotnet_diagnostic.xUnit1051.severity = none
|
|
dotnet_diagnostic.CA1707.severity = none
|