.editorconfig 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [*.{sln,csproj}]
  2. end_of_line = crlf
  3. charset = utf-8-bom
  4. [*.{csproj,props,targets,nuspec,resx}]
  5. indent_style = space
  6. indent_size = 2
  7. [*.cs]
  8. indent_style = space
  9. csharp_indent_case_contents_when_block = false
  10. csharp_new_line_before_open_brace = all
  11. csharp_new_line_before_else = true
  12. csharp_new_line_before_catch = true
  13. csharp_new_line_before_finally = true
  14. csharp_new_line_before_members_in_object_initializers = true
  15. csharp_new_line_before_members_in_anonymous_types = true
  16. dotnet_style_require_accessibility_modifiers = always
  17. # Diagnostics to prevent defensive copies of `in` struct parameters
  18. resharper_possibly_impure_method_call_on_readonly_variable_highlighting = error
  19. # IDE0040: Add accessibility modifiers
  20. dotnet_diagnostic.IDE0040.severity = warning
  21. # IDE1006: Naming rule violation
  22. dotnet_diagnostic.IDE1006.severity = suggestion
  23. # Severity levels for dotnet_naming_rule only affect IDE environments.
  24. # To have them extra visible to people, we can set them as 'warning' here without affecting compilation.
  25. # Everything should be PascalCase by default
  26. dotnet_naming_rule.all_should_be_camel_case.severity = warning
  27. dotnet_naming_rule.all_should_be_camel_case.symbols = all
  28. dotnet_naming_rule.all_should_be_camel_case.style = pascal_case_style
  29. # Non-public fields should be _camelCase
  30. dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.severity = warning
  31. dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.symbols = non_public_fields
  32. dotnet_naming_rule.non_public_fields_should_be_underscore_camel_case.style = underscore_camel_case_style
  33. # Constant fields (and local vars) should be PascalCase
  34. dotnet_naming_rule.constants_should_be_pascal_case.severity = warning
  35. dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
  36. dotnet_naming_rule.constants_should_be_pascal_case.style = pascal_case_style
  37. # Locals variables should be camelCase
  38. dotnet_naming_rule.local_vars_should_be_camel_case.severity = warning
  39. dotnet_naming_rule.local_vars_should_be_camel_case.symbols = local_vars
  40. dotnet_naming_rule.local_vars_should_be_camel_case.style = camel_case_style
  41. # Parameters should be camelCase
  42. dotnet_naming_rule.parameters_should_be_camel_case.severity = warning
  43. dotnet_naming_rule.parameters_should_be_camel_case.symbols = parameters
  44. dotnet_naming_rule.parameters_should_be_camel_case.style = camel_case_style
  45. dotnet_naming_symbols.all.applicable_kinds = *
  46. dotnet_naming_symbols.local_vars.applicable_kinds = local
  47. dotnet_naming_symbols.parameters.applicable_kinds = parameter
  48. dotnet_naming_symbols.constants.applicable_kinds = field, local
  49. dotnet_naming_symbols.constants.required_modifiers = const
  50. dotnet_naming_symbols.non_public_fields.applicable_kinds = field
  51. dotnet_naming_symbols.non_public_fields.applicable_accessibilities = private, protected, private_protected
  52. dotnet_naming_style.camel_case_style.capitalization = camel_case
  53. dotnet_naming_style.camel_case_style.required_prefix =
  54. dotnet_naming_style.underscore_camel_case_style.capitalization = camel_case
  55. dotnet_naming_style.underscore_camel_case_style.required_prefix = _
  56. dotnet_naming_style.pascal_case_style.capitalization = pascal_case
  57. dotnet_naming_style.pascal_case_style.required_prefix =