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