Skip to content

Commit b40f861

Browse files
committed
Merge remote-tracking branch 'origin/main' into RemoveNetCoreApp3.1
2 parents 895dda1 + 981ef2a commit b40f861

File tree

236 files changed

+14002
-11806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+14002
-11806
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0.301-focal
2+
3+
# Installing mono makes `dotnet test` work without errors even for net472.
4+
# But installing it takes a long time, so it's excluded by default.
5+
#RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
6+
#RUN echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee /etc/apt/sources.list.d/mono-official-stable.list
7+
#RUN apt-get update
8+
#RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mono-devel
9+
10+
# Clear the NUGET_XMLDOC_MODE env var so xml api doc files get unpacked, allowing a rich experience in Intellisense.
11+
# See https://github.com/dotnet/dotnet-docker/issues/2790 for a discussion on this, where the prioritized use case
12+
# was *not* devcontainers, sadly.
13+
ENV NUGET_XMLDOC_MODE=

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "Dev space",
3+
"dockerFile": "Dockerfile",
4+
"settings": {
5+
"terminal.integrated.shell.linux": "/usr/bin/pwsh"
6+
},
7+
"postCreateCommand": "./init.ps1 -InstallLocality machine",
8+
"extensions": [
9+
"ms-azure-devops.azure-pipelines",
10+
"ms-dotnettools.csharp",
11+
"k--kato.docomment",
12+
"editorconfig.editorconfig",
13+
"pflannery.vscode-versionlens",
14+
"davidanson.vscode-markdownlint",
15+
"dotjoshjohnson.xml",
16+
"ms-vscode-remote.remote-containers",
17+
"ms-azuretools.vscode-docker",
18+
"ms-vscode.powershell"
19+
]
20+
}

.editorconfig

Lines changed: 112 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,36 @@ root = true
66
# Don't use tabs for indentation.
77
[*]
88
indent_style = space
9+
910
# (Please don't specify an indent_size here; that has too many unintended consequences.)
1011

1112
[*.yml]
1213
indent_size = 2
14+
indent_style = space
1315

1416
# Code files
15-
[*.{cs,csx,vb,vbx}]
17+
[*.{cs,csx,vb,vbx,h,cpp,idl}]
1618
indent_size = 4
19+
insert_final_newline = true
20+
trim_trailing_whitespace = true
1721

1822
# Xml project files
19-
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
23+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj}]
2024
indent_size = 2
2125

2226
# Xml config files
23-
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
27+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,runsettings}]
2428
indent_size = 2
2529

2630
# JSON files
2731
[*.json]
2832
indent_size = 2
33+
indent_style = space
2934

3035
# Dotnet code style settings:
3136
[*.{cs,vb}]
3237
# Sort using and Import directives with System.* appearing first
3338
dotnet_sort_system_directives_first = true
34-
# Use "this." and "Me." everywhere
3539
dotnet_style_qualification_for_field = true:warning
3640
dotnet_style_qualification_for_property = true:warning
3741
dotnet_style_qualification_for_method = true:warning
@@ -48,22 +52,96 @@ dotnet_style_coalesce_expression = true:suggestion
4852
dotnet_style_null_propagation = true:suggestion
4953
dotnet_style_explicit_tuple_names = true:suggestion
5054

55+
# Non-private static fields are PascalCase
56+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
57+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
58+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
59+
60+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
61+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
62+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
63+
64+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
65+
66+
# Constants are PascalCase
67+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
68+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
69+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
70+
71+
dotnet_naming_symbols.constants.applicable_kinds = field, local
72+
dotnet_naming_symbols.constants.required_modifiers = const
73+
74+
dotnet_naming_style.constant_style.capitalization = pascal_case
75+
76+
# Static fields are camelCase
77+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
78+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
79+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
80+
81+
dotnet_naming_symbols.static_fields.applicable_kinds = field
82+
dotnet_naming_symbols.static_fields.required_modifiers = static
83+
84+
dotnet_naming_style.static_field_style.capitalization = camel_case
85+
86+
# Instance fields are camelCase
87+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
88+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
89+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
90+
91+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
92+
93+
dotnet_naming_style.instance_field_style.capitalization = camel_case
94+
95+
# Locals and parameters are camelCase
96+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
97+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
98+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
99+
100+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
101+
102+
dotnet_naming_style.camel_case_style.capitalization = camel_case
103+
104+
# Local functions are PascalCase
105+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
106+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
107+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
108+
109+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
110+
111+
dotnet_naming_style.local_function_style.capitalization = pascal_case
112+
113+
# By default, name items with PascalCase
114+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
115+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
116+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
117+
118+
dotnet_naming_symbols.all_members.applicable_kinds = *
119+
120+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
121+
51122
# CSharp code style settings:
52123
[*.cs]
124+
# Indentation preferences
125+
csharp_indent_block_contents = true
126+
csharp_indent_braces = false
127+
csharp_indent_case_contents = true
128+
csharp_indent_switch_labels = true
129+
csharp_indent_labels = flush_left
130+
53131
# Prefer "var" everywhere
54-
csharp_style_var_for_built_in_types = false:none
55-
csharp_style_var_when_type_is_apparent = true:none
56-
csharp_style_var_elsewhere = false:none
132+
csharp_style_var_for_built_in_types = false
133+
csharp_style_var_when_type_is_apparent = true:suggestion
134+
csharp_style_var_elsewhere = false:warning
57135

58136
# Prefer method-like constructs to have a block body
59-
csharp_style_expression_bodied_methods = true:suggestion
60-
csharp_style_expression_bodied_constructors = true:suggestion
61-
csharp_style_expression_bodied_operators = true:suggestion
137+
csharp_style_expression_bodied_methods = false:none
138+
csharp_style_expression_bodied_constructors = false:none
139+
csharp_style_expression_bodied_operators = false:none
62140

63141
# Prefer property-like constructs to have an expression-body
64-
csharp_style_expression_bodied_properties = true:suggestion
65-
csharp_style_expression_bodied_indexers = true:suggestion
66-
csharp_style_expression_bodied_accessors = true:suggestion
142+
csharp_style_expression_bodied_properties = true:none
143+
csharp_style_expression_bodied_indexers = true:none
144+
csharp_style_expression_bodied_accessors = true:none
67145

68146
# Suggest more modern language features when available
69147
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
@@ -85,3 +163,24 @@ dotnet_diagnostic.CSIsNull001.severity = warning
85163

86164
# CSIsNull002: Use `is object` for non-null checks
87165
dotnet_diagnostic.CSIsNull002.severity = warning
166+
167+
# Blocks are allowed
168+
csharp_prefer_braces = true:silent
169+
170+
# SA1130: Use lambda syntax
171+
dotnet_diagnostic.SA1130.severity = silent
172+
173+
# IDE1006: Naming Styles - StyleCop handles these for us
174+
dotnet_diagnostic.IDE1006.severity = none
175+
176+
dotnet_diagnostic.DOC100.severity = silent
177+
dotnet_diagnostic.DOC104.severity = warning
178+
dotnet_diagnostic.DOC105.severity = warning
179+
dotnet_diagnostic.DOC106.severity = warning
180+
dotnet_diagnostic.DOC107.severity = warning
181+
dotnet_diagnostic.DOC108.severity = warning
182+
dotnet_diagnostic.DOC200.severity = warning
183+
dotnet_diagnostic.DOC202.severity = warning
184+
185+
[*.sln]
186+
indent_style = tab

.gitattributes

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
# Set default behavior to automatically normalize line endings.
33
###############################################################################
44
* text=auto
5-
*.sh text eol=lf
5+
6+
# Ensure shell scripts use LF line endings (linux only accepts LF)
7+
*.sh eol=lf
8+
*.ps1 eol=lf
69

710
###############################################################################
811
# Set default behavior for command prompt diff.

0 commit comments

Comments
 (0)