forked from renode/renode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.editorconfig
More file actions
186 lines (149 loc) · 8.07 KB
/
.editorconfig
File metadata and controls
186 lines (149 loc) · 8.07 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Allow including user specific analyzers from global .editorconfig
root = false
[*.cs]
# By default disable all analyzers
dotnet_analyzer_diagnostic.severity = none
# Whitespaces
trim_trailing_whitespace = true
csharp_space_after_keywords_in_control_flow_statements = false
# Allow arbitrary number of spaces in decalrations
csharp_space_around_declaration_statements = ignore
# Indentation options
indent_size = 4
indent_style = space
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = false
csharp_indent_block_contents = true
csharp_indent_braces = false
# New line preferences
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_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
end_of_line = lf
# "var" instead of type
dotnet_diagnostic.IDE0007.severity = suggestion
# type instead of "var"
dotnet_diagnostic.IDE0008.severity = none
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true
# Require readonly modifier
dotnet_diagnostic.IDE0044.severity = warning
# Remove unused using directives
dotnet_diagnostic.IDE0005.severity = warning
# Remove unused parameters
dotnet_diagnostic.IDE0060.severity = warning
# Sort using directives alphabetically
dotnet_sort_system_directives_first = true
# Separate using directives groups with new lines
dotnet_separate_import_directive_groups = true
# Check for unassigned fields
dotnet_diagnostic.CS0649.severity = warning
# Modifiers order
dotnet_diagnostic.IDE0036.severity = warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
# Class members must have explicit accessibility modifiers
dotnet_style_require_accessibility_modifiers = always:warning
# Enable checking naming rules
dotnet_diagnostic.IDE1006.severity = warning
# camel_case_style - Define the camelCase style
dotnet_naming_style.camel_case_style.capitalization = camel_case
# pascal_case_style - Define the PascalCase style
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# prefix_interface_with_i_style - Define interfaces style
dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case
dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I
# Interfaces use PascalCase and are prefixed with uppercase 'I'
dotnet_naming_symbols.interface_group.applicable_kinds = interface
dotnet_naming_rule.interface_rule.symbols = interface_group
dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style
dotnet_naming_rule.interface_rule.severity = warning
# All of the following must be PascalCase:
# - Namespaces
# - Classes and Enumerations
# - Delegates
# - Constructors, Properties, Events, Methods
dotnet_naming_symbols.element_group.applicable_kinds = namespace, class, enum, struct, delegate, event, method, property
dotnet_naming_rule.element_rule.symbols = element_group
dotnet_naming_rule.element_rule.style = pascal_case_style
dotnet_naming_rule.element_rule.severity = warning
# All constant fields must be PascalCase
dotnet_naming_symbols.constant_fields_group.applicable_accessibilities = public, internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.constant_fields_group.required_modifiers = const
dotnet_naming_symbols.constant_fields_group.applicable_kinds = field
dotnet_naming_rule.constant_fields_must_be_pascal_case_rule.symbols = constant_fields_group
dotnet_naming_rule.constant_fields_must_be_pascal_case_rule.style = pascal_case_style
dotnet_naming_rule.constant_fields_must_be_pascal_case_rule.severity = warning
# All non-public fields must be camelCase
dotnet_naming_symbols.fields_group.applicable_accessibilities = internal, protected_internal, protected, private_protected, private
dotnet_naming_symbols.fields_group.applicable_kinds = field
dotnet_naming_rule.fields_must_be_camel_case_rule.symbols = fields_group
dotnet_naming_rule.fields_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.fields_must_be_camel_case_rule.severity = warning
# All public fields must be PascalCase
dotnet_naming_symbols.public_fields_group.applicable_accessibilities = public
dotnet_naming_symbols.public_fields_group.applicable_kinds = field
dotnet_naming_rule.fields_must_be_camel_case_rule.symbols = public_fields_group
dotnet_naming_rule.fields_must_be_camel_case_rule.style = pascal_case_style
dotnet_naming_rule.fields_must_be_camel_case_rule.severity = warning
# Local variables must be camelCase
dotnet_naming_symbols.local_variables_group.applicable_accessibilities = local
dotnet_naming_symbols.local_variables_group.applicable_kinds = local
dotnet_naming_rule.local_variables_must_be_camel_case_rule.symbols = local_variables_group
dotnet_naming_rule.local_variables_must_be_camel_case_rule.style = camel_case_style
dotnet_naming_rule.local_variables_must_be_camel_case_rule.severity = warning
# Function parameters use camelCase
dotnet_naming_symbols.parameters_group.applicable_kinds = parameter
dotnet_naming_rule.parameters_rule.symbols = parameters_group
dotnet_naming_rule.parameters_rule.style = camel_case_style
dotnet_naming_rule.parameters_rule.severity = warning
# Renode specific rules
dotnet_diagnostic.renode_copyright.severity = suggestion
dotnet_diagnostic.renode_class_members_order.severity = warning
# Setup StyleCop analyzers
# List of all analyzers: https://dotnetanalyzers.github.io/StyleCopAnalyzers/
# Opening braces should not be followed by blank line
dotnet_diagnostic.SA1505.severity = warning
# Code should not contain multiple blank lines in a row
dotnet_diagnostic.SA1507.severity = warning
# Closing braces should not be preceded by blank line
dotnet_diagnostic.SA1508.severity = warning
# Opening braces should not be preceded by blank line
dotnet_diagnostic.SA1509.severity = warning
# Seperate class members with blank line
dotnet_diagnostic.SA1516.severity = warning
# File must not start with blank line
dotnet_diagnostic.SA1517.severity = warning
# Exclude files from formatting
[src/Infrastructure/src/Emulator/Extensions/Config/SimpleJson.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_CMU_3.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_DPLL_1.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_EMU_3.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_HFRCO_2.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_HFXO_3.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_LFRCO_2.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_LFXO_1.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_PRS_3.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_SYSCFG_3.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Miscellaneous/SiLabs/EFR32xG2_DCDC_2.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/Timers/EFR32xG2_TIMER_1.Generated.cs]
generated_code = true
[src/Infrastructure/src/Emulator/Peripherals/Peripherals/I3C/Caliptra_I3C_generated.cs]
generated_code = true