Format and Update EditorConfig

- Update comments to be more to the point.
- Rearrange some lines in ascending order.
- Add more file types and their preferences.
- Rename missed files from previous renames.
This commit is contained in:
Nirmal Guru 2021-01-21 09:21:41 +05:30
Родитель f67ccd1863
Коммит 4ec02d5ef0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 230F32B3E627D620
4 изменённых файлов: 61 добавлений и 22 удалений

Просмотреть файл

@ -1,8 +1,8 @@
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
# All files
[*]
#### Core EditorConfig Options ####
@ -10,14 +10,40 @@ root = true
charset = utf-8
# Indentation and spacing
tab_width = 4
indent_size = 4
indent_style = space
tab_width = 4
# New line preferences
end_of_line = crlf
end_of_line = unset
insert_final_newline = false
#### Build files ####
# Solution files
[*.{sln,slnx}]
tab_width = 4
indent_size = 4
indent_style = tab
# Configuration files
[*.{json,xml,yml,config,runsettings}]
indent_size = 2
# MSBuild files
[*.{slnf,props,targets,projitems,csproj,shproj}]
indent_size = 2
#### Source files ####
# Markdown files
[*.md]
indent_size = 2
insert_final_newline = true
# C# files
[*.cs]
#### .NET Coding Conventions ####
# this. and Me. preferences
@ -138,8 +164,8 @@ csharp_space_between_square_brackets = false
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
# Naming Symbols
# constant_fields - Define constant fields
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
@ -171,6 +197,7 @@ dotnet_naming_symbols.non_interface_types.applicable_kinds
dotnet_naming_symbols.interface_types.applicable_kinds = interface
# Naming Styles
# camel_case - Define the camelCase style
dotnet_naming_style.camel_case.capitalization = camel_case
# pascal_case - Define the Pascal_case style
@ -239,15 +266,8 @@ dotnet_naming_rule.interface_types_must_be_prefixed_with_i.style
dotnet_naming_style.prefix_private_field_with_underscore.capitalization = camel_case
dotnet_naming_style.prefix_private_field_with_underscore.required_prefix = _
# Code files
# .NET Code Analysis
# SA1009: Closing parenthesis should be spaced correctly
# Needed for null forgiving operator after functions, "foo()!"
dotnet_diagnostic.SA1009.severity = none
[*.{cs,vb}]
# Migrate back from old Toolkit.ruleset
dotnet_diagnostic.CA1001.severity = warning
dotnet_diagnostic.CA1009.severity = warning
dotnet_diagnostic.CA1016.severity = warning
@ -310,24 +330,43 @@ dotnet_diagnostic.CA2238.severity = warning
dotnet_diagnostic.CA2240.severity = warning
dotnet_diagnostic.CA2241.severity = warning
dotnet_diagnostic.CA2242.severity = warning
# StyleCop Code Analysis
# Closing parenthesis should be spaced correctly: "foo()!"
dotnet_diagnostic.SA1009.severity = none
# Hide warnings when using the new() expression from C# 9.
dotnet_diagnostic.SA1000.severity = none
dotnet_diagnostic.SA1011.severity = none
dotnet_diagnostic.SA1101.severity = none
# Hide warnings when accessing properties without "this".
dotnet_diagnostic.SA1101.severity = none
dotnet_diagnostic.SA1118.severity = none
dotnet_diagnostic.SA1200.severity = none
dotnet_diagnostic.SA1201.severity = none
dotnet_diagnostic.SA1202.severity = none
dotnet_diagnostic.SA1309.severity = none
dotnet_diagnostic.SA1310.severity = none
# Hide warnings for record parameters.
dotnet_diagnostic.SA1313.severity = none
# TypeParameterNamesMustBeginWithT: We do have a few templates that don't start with T. We need to double check that changing this is not a breaking change. If not, we can re-enable this.
dotnet_diagnostic.SA1314.severity = none
# UseTrailingCommasInMultiLineInitializers: This would also mean a lot of changes at the end of all multiline initializers. It's also debatable if we want this or not.
dotnet_diagnostic.SA1413.severity = none
dotnet_diagnostic.SA1600.severity = none
dotnet_diagnostic.SA1602.severity = none
dotnet_diagnostic.SA1611.severity = none
# DocumentationTextMustEndWithAPeriod: Let's enable this rule back when we shift to WinUI3 (v8.x). If we do it now, it would mean more than 400 file changes.
dotnet_diagnostic.SA1629.severity = none
dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1634.severity = none
dotnet_diagnostic.SA1652.severity = none
dotnet_diagnostic.SA1629.severity = none # DocumentationTextMustEndWithAPeriod: Let's enable this rule back when we shift to WinUI3 (v8.x). If we do it now, it would mean more than 400 file changes.
dotnet_diagnostic.SA1413.severity = none # UseTrailingCommasInMultiLineInitializers: This would also mean a lot of changes at the end of all multiline initializers. It's also debatable if we want this or not.
dotnet_diagnostic.SA1314.severity = none # TypeParameterNamesMustBeginWithT: We do have a few templates that don't start with T. We need to double check that changing this is not a breaking change. If not, we can re-enable this.
dotnet_diagnostic.SA1000.severity = none # Hide warnings when using the new() expression from C# 9.
dotnet_diagnostic.SA1313.severity = none # Hide warnings for record parameters.
dotnet_diagnostic.SA1101.severity = none # Hide warnings when accessing properties without "this".

Просмотреть файл

@ -376,7 +376,7 @@ To add an image, it is almost like a link. You just need to add a \! before.
So inline image syntax looks like this:
>\!\[Helpers Image](https\://raw.githubusercontent.com/windows-toolkit/WindowsCommunityToolkit/main/Microsoft.Toolkit.Uwp.SampleApp/Assets/Helpers.png)
>\!\[Helpers Image](https\://raw.githubusercontent.com/CommunityToolkit/WindowsCommunityToolkit/main/Microsoft.Toolkit.Uwp.SampleApp/Assets/Helpers.png)
which renders in:
@ -412,7 +412,7 @@ which renders in:
MarkdownTextblock supports links wrapped with Images.
>\[!\[image](https\://raw.githubusercontent.com/windows-toolkit/WindowsCommunityToolkit/main/build/nuget.png)](https\://docs.microsoft.com/windows/uwpcommunitytoolkit/)
>\[!\[image](https\://raw.githubusercontent.com/CommunityToolkit/WindowsCommunityToolkit/main/build/nuget.png)](https\://docs.microsoft.com/windows/uwpcommunitytoolkit/)
will render into

Просмотреть файл