Skip to content

Commit a6c75d2

Browse files
authored
Merge branch dev into main (includes NuGet.Jobs and ServerCommon repo merge) (#10135)
2 parents 2e4a149 + ef1455c commit a6c75d2

2,663 files changed

Lines changed: 240176 additions & 459 deletions

File tree

Some content is hidden

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

.editorconfig

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
; EditorConfig to support per-solution formatting.
2+
; Use the EditorConfig VS add-in to make this work.
3+
; http://editorconfig.org/
4+
5+
; This is the default for the codeline.
6+
root = true
7+
8+
[*]
9+
; Don't use tabs for indentation.
10+
indent_style = space
11+
; (Please don't specify an indent_size here; that has too many unintended consequences.)
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
; Code files
17+
[*.{cs}]
18+
indent_size = 4
19+
20+
; All XML-based file formats
21+
[*.{config,csproj,nuspec,props,resx,ruleset,targets,vsct,vsixmanifest,xaml,xml,vsmanproj,swixproj}]
22+
indent_size = 2
23+
24+
; JSON files
25+
[*.json]
26+
indent_size = 2
27+
28+
; PowerShell scripts
29+
[*.{ps1}]
30+
indent_size = 4
31+
32+
[*.{sh}]
33+
indent_size = 4
34+
35+
; Dotnet code style settings
36+
[*.{cs,vb}]
37+
; Sort using and Import directives with System.* appearing first
38+
dotnet_sort_system_directives_first = true
39+
dotnet_separate_import_directive_groups = false
40+
41+
; IDE0003 Avoid "this." and "Me." if not necessary
42+
dotnet_style_qualification_for_field = false:silent
43+
dotnet_style_qualification_for_property = false:silent
44+
dotnet_style_qualification_for_method = false:silent
45+
dotnet_style_qualification_for_event = false:silent
46+
47+
; IDE0012 Use language keywords instead of framework type names for type references
48+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
49+
; IDE0013
50+
dotnet_style_predefined_type_for_member_access = true:silent
51+
52+
; Suggest more modern language features when available
53+
dotnet_style_object_initializer = true:suggestion
54+
dotnet_style_collection_initializer = true:suggestion
55+
dotnet_style_explicit_tuple_names = true:suggestion
56+
dotnet_style_coalesce_expression = true:suggestion
57+
dotnet_style_null_propagation = true:suggestion
58+
59+
; Licence header
60+
file_header_template = Copyright (c) .NET Foundation. All rights reserved.\nLicensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
61+
62+
; CSharp code style settings
63+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
64+
dotnet_style_prefer_conditional_expression_over_return = true:silent
65+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
66+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
67+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
68+
dotnet_style_prefer_compound_assignment = true:suggestion
69+
dotnet_style_prefer_simplified_interpolation = true:suggestion
70+
dotnet_style_namespace_match_folder = true:suggestion
71+
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
72+
dotnet_style_readonly_field = true:suggestion
73+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
74+
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
75+
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
76+
dotnet_code_quality_unused_parameters = all:suggestion
77+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
78+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
79+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
80+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
81+
dotnet_style_prefer_auto_properties = true:silent
82+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
83+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
84+
end_of_line = crlf
85+
indent_size = 4
86+
tab_width = 4
87+
[*.cs]
88+
; IDE0007 'var' preferences
89+
csharp_style_var_for_built_in_types = true:silent
90+
csharp_style_var_when_type_is_apparent = true:silent
91+
csharp_style_var_elsewhere = false:silent
92+
93+
; Helpful errors
94+
dotnet_diagnostic.CA2017.severity = suggestion
95+
dotnet_diagnostic.CS0105.severity = suggestion
96+
dotnet_diagnostic.IDE0005.severity = suggestion
97+
dotnet_diagnostic.CA1304.severity = suggestion
98+
dotnet_diagnostic.CA1305.severity = suggestion
99+
dotnet_diagnostic.CA1307.severity = suggestion
100+
dotnet_diagnostic.CA1309.severity = suggestion
101+
dotnet_diagnostic.CA1310.severity = suggestion
102+
dotnet_diagnostic.CA1311.severity = suggestion
103+
104+
; Prefer method-like constructs to have a block body
105+
csharp_style_expression_bodied_methods = false:silent
106+
csharp_style_expression_bodied_constructors = false:silent
107+
csharp_style_expression_bodied_operators = false:silent
108+
109+
; Prefer property-like constructs to have an expression-body
110+
csharp_style_expression_bodied_properties = true:silent
111+
csharp_style_expression_bodied_indexers = true:silent
112+
csharp_style_expression_bodied_accessors = true:silent
113+
114+
; Suggest more modern language features when available
115+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
116+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
117+
csharp_style_inlined_variable_declaration = true:suggestion
118+
csharp_style_throw_expression = true:suggestion
119+
csharp_style_conditional_delegate_call = true:suggestion
120+
121+
; Newline settings
122+
csharp_new_line_before_open_brace = all
123+
csharp_new_line_before_else = true
124+
csharp_new_line_before_catch = true
125+
csharp_new_line_before_finally = true
126+
csharp_new_line_before_members_in_object_initializers = true
127+
csharp_new_line_before_members_in_anonymous_types = true
128+
129+
; Naming styles
130+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
131+
dotnet_naming_style.camel_case_style.capitalization = camel_case
132+
133+
; Naming rule: async methods end in Async
134+
dotnet_naming_style.async_method_style.capitalization = pascal_case
135+
dotnet_naming_style.async_method_style.required_suffix = Async
136+
dotnet_naming_symbols.async_method_symbols.applicable_kinds = method
137+
dotnet_naming_symbols.async_method_symbols.required_modifiers = async
138+
dotnet_naming_rule.async_methods_rule.severity = suggestion
139+
dotnet_naming_rule.async_methods_rule.symbols = async_method_symbols
140+
dotnet_naming_rule.async_methods_rule.style = async_method_style
141+
142+
; Naming rule: Interfaces must be pascal-cased prefixed with I
143+
dotnet_naming_style.interface_style.capitalization = pascal_case
144+
dotnet_naming_style.interface_style.required_prefix = I
145+
dotnet_naming_symbols.interface_symbols.applicable_kinds = interface
146+
dotnet_naming_symbols.interface_symbols.applicable_accessibilities = *
147+
dotnet_naming_rule.interfaces_rule.severity = warning
148+
dotnet_naming_rule.interfaces_rule.symbols = interface_symbols
149+
dotnet_naming_rule.interfaces_rule.style = interface_style
150+
151+
; Naming rule: All methods and properties must be pascal-cased
152+
dotnet_naming_symbols.method_and_property_symbols.applicable_kinds = method,property,class,struct,enum:property,namespace
153+
dotnet_naming_symbols.method_and_property_symbols.applicable_accessibilities = *
154+
dotnet_naming_rule.methods_and_properties_rule.severity = warning
155+
dotnet_naming_rule.methods_and_properties_rule.symbols = method_and_property_symbols
156+
dotnet_naming_rule.methods_and_properties_rule.style = pascal_case_style
157+
158+
; Naming rule: Static fields must be pascal-cased
159+
dotnet_naming_symbols.static_member_symbols.applicable_kinds = field
160+
dotnet_naming_symbols.static_member_symbols.applicable_accessibilities = *
161+
dotnet_naming_symbols.static_member_symbols.required_modifiers = static
162+
dotnet_naming_symbols.const_member_symbols.applicable_kinds = field
163+
dotnet_naming_symbols.const_member_symbols.applicable_accessibilities = *
164+
dotnet_naming_symbols.const_member_symbols.required_modifiers = const
165+
dotnet_naming_rule.static_fields_rule.severity = warning
166+
dotnet_naming_rule.static_fields_rule.symbols = static_member_symbols
167+
dotnet_naming_rule.static_fields_rule.style = pascal_case_style
168+
169+
; Naming rule: Private members must be camel-cased and prefixed with underscore
170+
dotnet_naming_style.private_member_style.capitalization = camel_case
171+
dotnet_naming_style.private_member_style.required_prefix = _
172+
dotnet_naming_symbols.private_field_symbols.applicable_kinds = field,event
173+
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities = private,protected,internal
174+
dotnet_naming_rule.private_field_rule.severity = warning
175+
dotnet_naming_rule.private_field_rule.symbols = private_field_symbols
176+
dotnet_naming_rule.private_field_rule.style = private_member_style
177+
csharp_style_prefer_null_check_over_type_check = true:suggestion
178+
csharp_prefer_simple_default_expression = true:suggestion
179+
csharp_style_prefer_local_over_anonymous_function = true:suggestion
180+
csharp_style_prefer_index_operator = true:suggestion
181+
csharp_style_prefer_range_operator = true:suggestion
182+
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
183+
csharp_style_prefer_tuple_swap = true:suggestion
184+
csharp_style_deconstructed_variable_declaration = true:suggestion
185+
csharp_style_prefer_utf8_string_literals = true:suggestion
186+
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
187+
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
188+
csharp_prefer_static_anonymous_function = true:suggestion
189+
csharp_prefer_static_local_function = true:suggestion
190+
csharp_style_prefer_readonly_struct = true:suggestion
191+
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
192+
csharp_style_prefer_readonly_struct_member = true:suggestion
193+
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
194+
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
195+
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
196+
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
197+
csharp_style_prefer_pattern_matching = true:silent
198+
csharp_style_prefer_switch_expression = true:suggestion
199+
csharp_style_prefer_extended_property_pattern = true:suggestion
200+
csharp_style_prefer_not_pattern = true:suggestion
201+
csharp_style_expression_bodied_local_functions = false:silent
202+
csharp_style_expression_bodied_lambdas = true:silent
203+
csharp_prefer_system_threading_lock = true:suggestion
204+
csharp_style_prefer_primary_constructors = true:suggestion
205+
csharp_style_prefer_top_level_statements = true:silent
206+
csharp_style_prefer_method_group_conversion = true:silent
207+
csharp_style_namespace_declarations = block_scoped:silent
208+
csharp_using_directive_placement = outside_namespace:silent
209+
csharp_prefer_braces = true:silent
210+
csharp_prefer_simple_using_statement = true:suggestion
211+
csharp_space_around_binary_operators = before_and_after
212+
csharp_indent_labels = no_change

.gitignore

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ FodyWeavers.xsd
382382
!.vscode/tasks.json
383383
!.vscode/launch.json
384384
!.vscode/extensions.json
385-
*.code-workspace
385+
!.vscode/*.code-snippets
386386

387387
# Local History for Visual Studio Code
388388
.history/
@@ -397,6 +397,10 @@ FodyWeavers.xsd
397397
# JetBrains Rider
398398
*.sln.iml
399399

400+
# macOS
401+
.DS_Store
402+
403+
400404
#######################
401405
# Repository specific #
402406
#######################
@@ -405,17 +409,16 @@ nuget.exe
405409
Results.*.xml
406410
AssemblyInfo.*.cs
407411

408-
# common build tools
409-
build/
410-
tools/
411-
412412
# Functional test results
413413
tests/functionaltests.*.xml
414414
*.trx
415415
*.g.txt
416416

417+
# launch settings for running jobs locally
418+
**/Properties/launchSettings.json
419+
417420
# The applicationhost.config is ignored, but already comitted on purpose
418-
# Reason: The localtest.me setting needs to be configured in the <sites>-section.
421+
# Reason: The localtest.me setting needs to be configured in the <sites>-section.
419422
# See ReadMe.md for more information
420423
.vs/config/applicationhost.config
421424

@@ -431,3 +434,5 @@ src/NuGetGallery/App_Data/Files/*
431434
!src/NuGetGallery/App_Data/Files/Content/
432435
!src/NuGetGallery/Views/Packages/
433436
!src/NuGetGallery/Branding/Views/Packages/
437+
438+

0 commit comments

Comments
 (0)