Skip to content

Commit a8678a0

Browse files
Add .editorconfig file to MIEngine (microsoft#1103)
This adds a .editorconfig file. This is based on the Concord repo's file with additional changes from https://github.com/dotnet/runtime/blob/master/.editorconfig
1 parent 1e4831f commit a8678a0

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.editorconfig

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
# This configuration is respected by multiple editors
3+
# Using basic settings to unify indentation in repo
4+
5+
# top-most EditorConfig file
6+
root = true
7+
8+
[*]
9+
indent_style = space
10+
indent_size = 4
11+
end_of_line = crlf
12+
trim_trailing_whitespace = true
13+
14+
# XML Formats
15+
16+
[*.{xml,csproj,androidproj,vcxproj,vcxproj.filters,nuspec,vsct,resx,config,targets,props,xsd,natvis,playlist}]
17+
indent_size = 2
18+
19+
# JSON and YML
20+
[*.yml]
21+
[*.json]
22+
indent_size = 2
23+
24+
# .NET
25+
26+
[*.cs]
27+
file_header_template = // Copyright (c) Microsoft. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.
28+
dotnet_sort_system_directives_first = false
29+
30+
# static fields should have s_ prefix
31+
dotnet_naming_rule.static_fields_should_have_prefix.severity = warning
32+
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
33+
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
34+
dotnet_naming_symbols.static_fields.applicable_kinds = field
35+
dotnet_naming_symbols.static_fields.required_modifiers = static
36+
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
37+
dotnet_naming_style.static_prefix_style.required_prefix = s_
38+
dotnet_naming_style.static_prefix_style.capitalization = camel_case
39+
40+
# internal and private fields should be _camelCase
41+
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
42+
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
43+
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
44+
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
45+
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
46+
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
47+
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
48+
49+
dotnet_style_readonly_field = true:warning
50+
51+
# Unix Shell scripts
52+
[*.sh]
53+
charset = utf-8
54+
end_of_line = lf
55+
56+
[*.sln]
57+
indent_style = tab

src/MIDebugEngine.sln

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Android", "Android", "{2865
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CF02407C-BF37-4D51-83F4-845A7F36C101}"
1111
ProjectSection(SolutionItems) = preProject
12+
..\.editorconfig = ..\.editorconfig
1213
IDECodeAnalysis.ruleset = IDECodeAnalysis.ruleset
1314
EndProjectSection
1415
EndProject
@@ -59,7 +60,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.VisualStudio.Debu
5960
EndProject
6061
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MIDebugPackage", "MIDebugPackage\MIDebugPackage.csproj", "{A8D8E02F-4258-4F2E-88B6-A50FEBD5AD8C}"
6162
ProjectSection(ProjectDependencies) = postProject
62-
{15BCBEF4-1C2B-412B-925B-34A049097E62} = {15BCBEF4-1C2B-412B-925B-34A049097E62}
63+
{15BCBEF4-1C2B-412B-925B-34A049097E62} = {15BCBEF4-1C2B-412B-925B-34A049097E62}
6364
EndProjectSection
6465
EndProject
6566
Global

0 commit comments

Comments
 (0)