-
Notifications
You must be signed in to change notification settings - Fork 1
/
.editorconfig
66 lines (51 loc) · 2.7 KB
/
.editorconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Signature-Code .editorconfig
# See also: https://github.com/dotnet/roslyn/blob/master/src/Workspaces/CSharp/Portable/Formatting/CSharpFormattingOptions.cs
# 20170522
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.{cs,js,ts,sql,tql}]
indent_size = 4
end_of_line = crlf
[*.cs]
csharp_space_between_method_call_parameter_list_parentheses = true
csharp_space_between_method_declaration_parameter_list_parentheses = true
csharp_space_after_keywords_in_control_flow_statements = false
csharp_space_between_parentheses = control_flow_statements
# Motive: May be weird at first, but it improve readability.
# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Motive: It follow the C# style guideline.
# CA1063: Implement IDisposable Correctly
dotnet_diagnostic.CA1063.severity = none
# Motive: This warning is irrelevant because we only use managed objects and we SHOULD always do.
# The dispose pattern (see here https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose) may be useful only in some edge case,
# If you feel like you NEED to handle an unmanaged resource, please let's talk about this first: it may well be a bad idea...
# and most of the time (99.99...%) a simple IDisposable implementation IS okay.
# IDE0063: Use simple 'using' statement.
csharp_prefer_simple_using_statement = false:none
# Motive: Most of the time, the 'not simple' using scope is better.
# CA1031: Do not catch general exception types.
dotnet_diagnostic.CA1031.severity = none
# IDE0057: Use range operator.
csharp_style_prefer_range_operator = false:suggestion
# Motive: Use it if you want but this is should not show a message.
# IDE0060: Remove unused parameter
dotnet_code_quality_unused_parameters = all:silent
# Motive: Emit messages where the parameter are necessary.
# IDE0040: Add accessibility modifiers
dotnet_style_require_accessibility_modifiers = omit_if_default:silent
# CA1034: Nested types should not be visible.
dotnet_diagnostic.CA1034.severity = none
# Motive: Nested types can be used to design a good API.
# /Signature-Code .editorconfig