Skip to content

Commit d5a97d5

Browse files
author
Jason Zhai
committed
Merge branch 'release/8.0.1xx' of https://github.com/dotnet/sdk into merge/release/6.0.4xx-to-release/8.0.1xx
2 parents b9862ec + e0c4a75 commit d5a97d5

File tree

5,169 files changed

+246472
-94069
lines changed

Some content is hidden

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

5,169 files changed

+246472
-94069
lines changed

.editorconfig

Lines changed: 315 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ root = true
1010
insert_final_newline = true
1111
indent_style = space
1212
indent_size = 4
13+
trim_trailing_whitespace = true
1314

14-
[project.json]
15+
[*.json]
1516
indent_size = 2
1617

18+
# Generated code
19+
[*{_AssemblyInfo.cs,.notsupported.cs,*/obj/*/External/**/*,*/obj/dotnet-new.IntegrationTests/*/TemplatePackagesPaths.cs}]
20+
generated_code = true
21+
1722
# C# files
1823
[*.cs]
1924
# New line preferences
@@ -43,9 +48,9 @@ dotnet_style_qualification_for_method = false:suggestion
4348
dotnet_style_qualification_for_event = false:suggestion
4449

4550
# Types: use keywords instead of BCL types, and permit var only when the type is clear
46-
csharp_style_var_for_built_in_types = false:suggestion
51+
csharp_style_var_for_built_in_types = false:none
4752
csharp_style_var_when_type_is_apparent = false:none
48-
csharp_style_var_elsewhere = false:suggestion
53+
csharp_style_var_elsewhere = false:none
4954
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
5055
dotnet_style_predefined_type_for_member_access = true:suggestion
5156

@@ -156,7 +161,307 @@ csharp_space_between_square_brackets = false
156161
dotnet_code_quality.api_surface = all
157162

158163
# License header
159-
file_header_template = Copyright (c) .NET Foundation and contributors. All rights reserved.\nLicensed under the MIT license. See LICENSE file in the project root for full license information.\n
164+
file_header_template = Licensed to the .NET Foundation under one or more agreements.\nThe .NET Foundation licenses this file to you under the MIT license.
165+
166+
# Code files
167+
[*.{cs,vb}]
168+
# Analyzers
169+
dotnet_code_quality.ca1802.api_surface = private, internal
170+
dotnet_code_quality.ca1822.api_surface = private, internal
171+
dotnet_code_quality.ca2208.api_surface = public
172+
# Mark attributes with AttributeUsageAttribute
173+
dotnet_diagnostic.CA1018.severity = warning
174+
# Properties should not be write only
175+
dotnet_diagnostic.CA1044.severity = warning
176+
# Do not declare protected member in sealed type
177+
dotnet_diagnostic.CA1047.severity = warning
178+
# Declare types in namespaces
179+
dotnet_diagnostic.CA1050.severity = warning
180+
# Avoid using cref tags with a prefix
181+
dotnet_diagnostic.CA1200.severity = suggestion
182+
# P/Invokes should not be visible
183+
dotnet_diagnostic.CA1401.severity = warning
184+
# Parameter names should match base declaration
185+
dotnet_diagnostic.CA1725.severity = suggestion
186+
# Remove empty Finalizers
187+
dotnet_diagnostic.CA1821.severity = warning
188+
# Mark assemblies with NeutralResourcesLanguageAttribute
189+
dotnet_diagnostic.CA1824.severity = warning
190+
# Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
191+
dotnet_diagnostic.CA1828.severity = warning
192+
# Prefer strongly-typed Append and Insert method overloads on StringBuilder.
193+
dotnet_diagnostic.CA1830.severity = warning
194+
# Use AsSpan or AsMemory instead of Range-based indexers when appropriate
195+
dotnet_diagnostic.CA1832.severity = warning
196+
# Use AsSpan or AsMemory instead of Range-based indexers when appropriate
197+
dotnet_diagnostic.CA1833.severity = warning
198+
# Prefer IsEmpty over Count
199+
dotnet_diagnostic.CA1836.severity = warning
200+
# Use 'Environment.ProcessPath'
201+
dotnet_diagnostic.CA1839.severity = warning
202+
# Do not call ToImmutableCollection on an ImmutableCollection value
203+
# Temporarily disable to avoid regression in preview 1, revert back to warning when start using preview 2
204+
dotnet_diagnostic.CA2009.severity = none
205+
# Avoid infinite recursion
206+
dotnet_diagnostic.CA2011.severity = warning
207+
# Initialize value type static fields inline
208+
dotnet_diagnostic.CA2207.severity = warning
209+
# Implement serialization constructors
210+
dotnet_diagnostic.CA2229.severity = warning
211+
# Provide correct arguments to formatting methods
212+
dotnet_diagnostic.CA2241.severity = warning
213+
# Test for NaN correctly
214+
dotnet_diagnostic.CA2242.severity = warning
215+
# Do not assign a property to itself.
216+
dotnet_diagnostic.CA2245.severity = warning
217+
# Provide correct 'enum' argument to 'Enum.HasFlag'
218+
dotnet_diagnostic.CA2248.severity = warning
219+
# Do Not Add Schema By URL
220+
dotnet_diagnostic.CA3061.severity = warning
221+
# Insecure DTD processing in XML
222+
dotnet_diagnostic.CA3075.severity = warning
223+
# Insecure XSLT script processing.
224+
dotnet_diagnostic.CA3076.severity = warning
225+
# Insecure Processing in API Design, XmlDocument and XmlTextReader
226+
dotnet_diagnostic.CA3077.severity = warning
227+
# Mark Verb Handlers With Validate Antiforgery Token
228+
dotnet_diagnostic.CA3147.severity = warning
229+
# Do Not Use Broken Cryptographic Algorithms
230+
dotnet_diagnostic.CA5351.severity = warning
231+
# Do Not Disable Certificate Validation
232+
dotnet_diagnostic.CA5359.severity = warning
233+
# Do Not Call Dangerous Methods In Deserialization
234+
dotnet_diagnostic.CA5360.severity = warning
235+
# Do Not Disable SChannel Use of Strong Crypto
236+
dotnet_diagnostic.CA5361.severity = warning
237+
# Do Not Disable Request Validation
238+
dotnet_diagnostic.CA5363.severity = warning
239+
# Do Not Use Deprecated Security Protocols
240+
dotnet_diagnostic.CA5364.severity = warning
241+
# Do Not Disable HTTP Header Checking
242+
dotnet_diagnostic.CA5365.severity = warning
243+
# Set ViewStateUserKey For Classes Derived From Page
244+
dotnet_diagnostic.CA5368.severity = warning
245+
# Use XmlReader For Validating Reader
246+
dotnet_diagnostic.CA5370.severity = warning
247+
# Do not use obsolete key derivation function
248+
dotnet_diagnostic.CA5373.severity = warning
249+
# Do Not Use XslTransform
250+
dotnet_diagnostic.CA5374.severity = warning
251+
# Use SharedAccessProtocol HttpsOnly
252+
dotnet_diagnostic.CA5376.severity = warning
253+
# Use Container Level Access Policy
254+
dotnet_diagnostic.CA5377.severity = warning
255+
# Do not disable ServicePointManagerSecurityProtocols
256+
dotnet_diagnostic.CA5378.severity = warning
257+
# Do Not Use Weak Key Derivation Function Algorithm
258+
dotnet_diagnostic.CA5379.severity = warning
259+
# Do Not Add Certificates To Root Store
260+
dotnet_diagnostic.CA5380.severity = warning
261+
# Ensure Certificates Are Not Added To Root Store
262+
dotnet_diagnostic.CA5381.severity = warning
263+
# Do Not Use Digital Signature Algorithm (DSA)
264+
dotnet_diagnostic.CA5384.severity = warning
265+
# Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size
266+
dotnet_diagnostic.CA5385.severity = warning
267+
dotnet_diagnostic.CS1591.severity = suggestion
268+
# UseIsNullCheck
269+
dotnet_diagnostic.IDE0041.severity = warning
270+
# ValidateFormatString
271+
dotnet_diagnostic.IDE0043.severity = warning
272+
# MakeLocalFunctionStatic
273+
dotnet_diagnostic.IDE0062.severity = warning
274+
# ConvertTypeOfToNameOf
275+
dotnet_diagnostic.IDE0082.severity = warning
276+
# Remove redundant nullable directive
277+
dotnet_diagnostic.IDE0240.severity = warning
278+
279+
# Additional rules for template engine source code
280+
[src/**{Microsoft.TemplateEngine.*,dotnet-new?*}/**.cs]
281+
# Default analyzed API surface = 'public' (public APIs)
282+
dotnet_code_quality.api_surface = public
283+
# Provide ObsoleteAttribute message
284+
dotnet_diagnostic.CA1041.severity = warning
285+
# Static holder types should be Static or NotInheritable
286+
dotnet_diagnostic.CA1052.severity = warning
287+
# Use nameof to express symbol names
288+
dotnet_diagnostic.CA1507.severity = warning
289+
# Use literals where appropriate
290+
dotnet_diagnostic.CA1802.severity = warning
291+
# Do not initialize unnecessarily
292+
dotnet_diagnostic.CA1805.severity = warning
293+
# Initialize reference type static fields inline
294+
dotnet_diagnostic.CA1810.severity = warning
295+
# Avoid unused private fields
296+
dotnet_diagnostic.CA1823.severity = warning
297+
# Avoid zero-length array allocations.
298+
dotnet_diagnostic.CA1825.severity = warning
299+
# Do not use Enumerable methods on indexable collections. Instead use the collection directly
300+
dotnet_diagnostic.CA1826.severity = warning
301+
# Do not use Count() or LongCount() when Any() can be used
302+
dotnet_diagnostic.CA1827.severity = warning
303+
# Use Length/Count property instead of Count() when available
304+
dotnet_diagnostic.CA1829.severity = warning
305+
# Consider using 'StringBuilder.Append(char)' when applicable.
306+
dotnet_diagnostic.CA1834.severity = warning
307+
# Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
308+
dotnet_diagnostic.CA1835.severity = warning
309+
# Use 'Environment.ProcessId'
310+
dotnet_diagnostic.CA1837.severity = warning
311+
# Avoid 'StringBuilder' parameters for P/Invokes
312+
dotnet_diagnostic.CA1838.severity = warning
313+
# Use 'Environment.CurrentManagedThreadId'
314+
dotnet_diagnostic.CA1840.severity = warning
315+
# Consider calling ConfigureAwait on the awaited task
316+
dotnet_diagnostic.CA2007.severity = warning
317+
# Do not create tasks without passing a TaskScheduler
318+
dotnet_diagnostic.CA2008.severity = warning
319+
# Use ValueTasks correctly
320+
dotnet_diagnostic.CA2012.severity = warning
321+
# Forward the 'CancellationToken' parameter to methods that take one
322+
dotnet_diagnostic.CA2016.severity = warning
323+
# Instantiate argument exceptions correctly
324+
dotnet_diagnostic.CA2208.severity = warning
325+
# Consider using 'string.Contains' instead of 'string.IndexOf'
326+
dotnet_diagnostic.CA2249.severity = warning
327+
# Do Not Use Weak Cryptographic Algorithms
328+
dotnet_diagnostic.CA5350.severity = warning
329+
# Do not use insecure randomness
330+
dotnet_diagnostic.CA5394.severity = warning
331+
# Remove unnecessary using directives
332+
dotnet_diagnostic.IDE0005.severity = warning
333+
# Fix formating
334+
dotnet_diagnostic.IDE0055.severity = warning
335+
# FileHeaderMismatch
336+
dotnet_diagnostic.IDE0073.severity = warning
337+
# Single line comment should begin with a space
338+
dotnet_diagnostic.SA1005.severity = none
339+
# Opening parenthesis should not be preceded by a space
340+
dotnet_diagnostic.SA1008.severity = none
341+
# Closing parenthesis should not be followed by a space
342+
dotnet_diagnostic.SA1009.severity = none
343+
# Prefix local calls with this
344+
dotnet_diagnostic.SA1101.severity = none
345+
# Block statements should not contain embedded comments
346+
dotnet_diagnostic.SA1108.severity = none
347+
# Closing parenthesis should be on line of last parameter
348+
dotnet_diagnostic.SA1111.severity = none
349+
# Parameter should not span multiple lines
350+
dotnet_diagnostic.SA1118.severity = none
351+
# Statement should not use unnecessary parenthesis
352+
dotnet_diagnostic.SA1119.severity = none
353+
# Comments should contain text
354+
dotnet_diagnostic.SA1120.severity = none
355+
# Use string.Empty for empty strings
356+
dotnet_diagnostic.SA1122.severity = none
357+
# Region should not be located within a code element
358+
dotnet_diagnostic.SA1123.severity = none
359+
# Do not use regions
360+
dotnet_diagnostic.SA1124.severity = none
361+
# Generic type constraints should be on their own line
362+
dotnet_diagnostic.SA1127.severity = none
363+
# Put constructor initializers on their own line
364+
dotnet_diagnostic.SA1128.severity = none
365+
# Constant values should appear on the right-hand side of comparisons
366+
dotnet_diagnostic.SA1131.severity = none
367+
# Elements should have the same indentation
368+
dotnet_diagnostic.SA1137.severity = none
369+
# Use literal suffix notation instead of casting
370+
dotnet_diagnostic.SA1139.severity = none
371+
# Use tuple syntax
372+
dotnet_diagnostic.SA1141.severity = warning
373+
# Refer to tuple elements by name
374+
dotnet_diagnostic.SA1142.severity = warning
375+
# Using directive should appear within a namespace declaration
376+
dotnet_diagnostic.SA1200.severity = none
377+
# Field names should not begin with underscore
378+
dotnet_diagnostic.SA1309.severity = none
379+
# Type parameter names should begin with T
380+
dotnet_diagnostic.SA1314.severity = none
381+
# Tuple element names should use correct casing
382+
dotnet_diagnostic.SA1316.severity = warning
383+
# File may only contain a single type
384+
dotnet_diagnostic.SA1402.severity = none
385+
# Debug.Assert should provide message text
386+
dotnet_diagnostic.SA1405.severity = none
387+
# Arithmetic expressions should declare precedence
388+
dotnet_diagnostic.SA1407.severity = none
389+
# Conditional expressions should declare precedence
390+
dotnet_diagnostic.SA1408.severity = none
391+
# Use trailing comma in multi-line initializers
392+
dotnet_diagnostic.SA1413.severity = none
393+
# Tuple types in signatures should have element names
394+
dotnet_diagnostic.SA1414.severity = none
395+
# Statement should not be on a single line
396+
dotnet_diagnostic.SA1501.severity = none
397+
# Element should not be on a single line
398+
dotnet_diagnostic.SA1502.severity = none
399+
# All accessors should be single-line or multi-line
400+
dotnet_diagnostic.SA1504.severity = none
401+
# A closing brace should not be preceded by a blank line
402+
dotnet_diagnostic.SA1508.severity = none
403+
# Opening braces should not be preceded by blank line
404+
dotnet_diagnostic.SA1509.severity = none
405+
# Single-line comments should not be followed by blank line
406+
dotnet_diagnostic.SA1512.severity = none
407+
# Closing brace should be followed by blank line
408+
dotnet_diagnostic.SA1513.severity = none
409+
# Single-line comment should be preceded by blank line
410+
dotnet_diagnostic.SA1515.severity = none
411+
# Code should not contain blank lines at the end of the file
412+
dotnet_diagnostic.SA1518.severity = none
413+
# Elements should be documented
414+
dotnet_diagnostic.SA1600.severity = none
415+
# Partial elements should be documented
416+
dotnet_diagnostic.SA1601.severity = none
417+
# Enumeration items should be documented
418+
dotnet_diagnostic.SA1602.severity = none
419+
# The documentation for parameter 'message' is missing
420+
dotnet_diagnostic.SA1611.severity = none
421+
# Element parameter documentation should have text
422+
dotnet_diagnostic.SA1614.severity = none
423+
# Element return value should be documented
424+
dotnet_diagnostic.SA1615.severity = none
425+
# Element return value documentation should have text
426+
dotnet_diagnostic.SA1616.severity = none
427+
# The documentation for type parameter is missing
428+
dotnet_diagnostic.SA1618.severity = none
429+
# Generic type parameter documentation should have text
430+
dotnet_diagnostic.SA1622.severity = none
431+
# Property documentation text
432+
dotnet_diagnostic.SA1623.severity = none
433+
# Element documentation should not be copied and pasted
434+
dotnet_diagnostic.SA1625.severity = none
435+
# The documentation text within the \'exception\' tag should not be empty
436+
dotnet_diagnostic.SA1627.severity = none
437+
# File should have header
438+
dotnet_diagnostic.SA1633.severity = none
439+
# Constructor summary documentation should begin with standard text
440+
dotnet_diagnostic.SA1642.severity = none
441+
# File name should match first type name
442+
dotnet_diagnostic.SA1649.severity = none
443+
444+
# Disable some StyleCop rules for test common Program.cs that is linked to test project of template engine
445+
[src/Tests/Common/Program.cs]
446+
# Declare types in namespaces
447+
dotnet_diagnostic.CA1050.severity = none
448+
# Elements should be documented
449+
dotnet_diagnostic.SA1600.severity = none
450+
# Partial elements should be documented
451+
dotnet_diagnostic.SA1601.severity = none
452+
# File should have header: The file header XML is invalid.
453+
dotnet_diagnostic.SA1633.severity = none
454+
455+
# Additional rules for test source code for template engine
456+
[src/Tests/{Microsoft.TemplateEngine.*,dotnet-new.Tests}/**.cs]
457+
# Test methods should not be skipped
458+
dotnet_diagnostic.xUnit1004.severity = warning
459+
# Elements should appear in the correct order
460+
dotnet_diagnostic.SA1201.severity = none
461+
# Elements should be ordered by access
462+
dotnet_diagnostic.SA1202.severity = none
463+
# Static elements should appear before instance elements
464+
dotnet_diagnostic.SA1204.severity = none
160465

161466
# C++ Files
162467
[*.{cpp,h,in}]
@@ -194,3 +499,9 @@ end_of_line = crlf
194499

195500
# IDE0040: Add accessibility modifiers
196501
dotnet_diagnostic.IDE0040.severity = warning
502+
503+
[*.txt]
504+
insert_final_newline = false
505+
506+
[src/Tests/dotnet-new.Tests/**/Approvals/**]
507+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
###############################################################################
55
* text=auto
66

7+
###############################################################################
8+
# Set default behavior to:
9+
# collapse these files in PRs
10+
###############################################################################
11+
*.xlf linguist-generated=true
12+
713
###############################################################################
814
# Set file behavior to:
915
# treat as text
@@ -27,7 +33,6 @@
2733
*.xlf text
2834
*.xml text
2935

30-
3136
###############################################################################
3237
# Set file behavior to:
3338
# treat as text
@@ -50,4 +55,4 @@
5055

5156
*.jpg binary
5257
*.png binary
53-
*.gif binary
58+
*.gif binary

0 commit comments

Comments
 (0)