Update license, lang-version and style config
This commit is contained in:
Родитель
77cec7da7a
Коммит
01791377de
|
@ -1,5 +1,5 @@
|
|||
# Version: 2.1.0 (Using https://semver.org/)
|
||||
# Updated: 2021-03-03
|
||||
# Version: 4.1.1 (Using https://semver.org/)
|
||||
# Updated: 2022-05-23
|
||||
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
|
||||
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
|
||||
# See http://EditorConfig.org for more information about .editorconfig files.
|
||||
|
@ -49,11 +49,11 @@ indent_size = 2
|
|||
indent_size = 2
|
||||
|
||||
# Markdown Files
|
||||
[*.md]
|
||||
[*.{md,mdx}]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
# Web Files
|
||||
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
|
||||
[*.{htm,html,js,jsm,ts,tsx,cjs,cts,ctsx,mjs,mts,mtsx,css,sass,scss,less,pcss,svg,vue}]
|
||||
indent_size = 2
|
||||
|
||||
# Batch Files
|
||||
|
@ -75,7 +75,7 @@ indent_style = tab
|
|||
|
||||
[*.{cs,csx,cake,vb,vbx}]
|
||||
# Default Severity for all .NET Code Style rules below
|
||||
dotnet_analyzer_diagnostic.category-style.severity = warning
|
||||
dotnet_analyzer_diagnostic.severity = warning
|
||||
|
||||
##########################################
|
||||
# Language Rules
|
||||
|
@ -122,13 +122,13 @@ dotnet_style_coalesce_expression = true:warning
|
|||
dotnet_style_null_propagation = true:warning
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||
# File header preferences
|
||||
file_header_template = Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0.
|
||||
file_header_template = Copyright (c) Six Labors.\nLicensed under the Six Labors Split License.
|
||||
# SA1636: File header copyright text should match
|
||||
# Justification: .editorconfig supports file headers. If this is changed to a value other than "none", a stylecop.json file will need to added to the project.
|
||||
# dotnet_diagnostic.SA1636.severity = none
|
||||
|
||||
# Undocumented
|
||||
dotnet_style_operator_placement_when_wrapping = end_of_line
|
||||
dotnet_style_operator_placement_when_wrapping = end_of_line:warning
|
||||
csharp_style_prefer_null_check_over_type_check = true:warning
|
||||
|
||||
# C# Style Rules
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
|
||||
|
@ -200,12 +200,15 @@ dotnet_diagnostic.IDE0059.severity = suggestion
|
|||
# Organize using directives
|
||||
dotnet_sort_system_directives_first = true
|
||||
dotnet_separate_import_directive_groups = false
|
||||
# Dotnet namespace options
|
||||
dotnet_style_namespace_match_folder = true:suggestion
|
||||
dotnet_diagnostic.IDE0130.severity = suggestion
|
||||
|
||||
# C# formatting rules
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#c-formatting-rules
|
||||
[*.{cs,csx,cake}]
|
||||
# Newline options
|
||||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#new-line-options
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#new-line-options
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_new_line_before_else = true
|
||||
csharp_new_line_before_catch = true
|
||||
|
@ -214,7 +217,7 @@ csharp_new_line_before_members_in_object_initializers = true
|
|||
csharp_new_line_before_members_in_anonymous_types = true
|
||||
csharp_new_line_between_query_expression_clauses = true
|
||||
# Indentation options
|
||||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#indentation-options
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#indentation-options
|
||||
csharp_indent_case_contents = true
|
||||
csharp_indent_switch_labels = true
|
||||
csharp_indent_labels = no_change
|
||||
|
@ -222,7 +225,7 @@ csharp_indent_block_contents = true
|
|||
csharp_indent_braces = false
|
||||
csharp_indent_case_contents_when_block = false
|
||||
# Spacing options
|
||||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#spacing-options
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#spacing-options
|
||||
csharp_space_after_cast = false
|
||||
csharp_space_after_keywords_in_control_flow_statements = true
|
||||
csharp_space_between_parentheses = false
|
||||
|
@ -246,9 +249,12 @@ csharp_space_before_open_square_brackets = false
|
|||
csharp_space_between_empty_square_brackets = false
|
||||
csharp_space_between_square_brackets = false
|
||||
# Wrap options
|
||||
# https://docs.microsoft.com/visualstudio/ide/editorconfig-formatting-conventions#wrap-options
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#wrap-options
|
||||
csharp_preserve_single_line_statements = false
|
||||
csharp_preserve_single_line_blocks = true
|
||||
# Namespace options
|
||||
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/formatting-rules#namespace-options
|
||||
csharp_style_namespace_declarations = file_scoped:warning
|
||||
|
||||
##########################################
|
||||
# .NET Naming Rules
|
||||
|
@ -275,9 +281,8 @@ dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_
|
|||
dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
|
||||
# disallowed_style - Anything that has this style applied is marked as disallowed
|
||||
dotnet_naming_style.disallowed_style.capitalization = pascal_case
|
||||
# Disabled while we investigate compatibility with VS 16.10
|
||||
#dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
|
||||
#dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
|
||||
dotnet_naming_style.disallowed_style.required_prefix = ____RULE_VIOLATION____
|
||||
dotnet_naming_style.disallowed_style.required_suffix = ____RULE_VIOLATION____
|
||||
# internal_error_style - This style should never occur... if it does, it indicates a bug in file or in the parser using the file
|
||||
dotnet_naming_style.internal_error_style.capitalization = pascal_case
|
||||
dotnet_naming_style.internal_error_style.required_prefix = ____INTERNAL_ERROR____
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<!--
|
||||
Define Environmental conditionals. Determined by environmental settings set in build-and-test.yml
|
||||
These proeprties are defined 2X to ensure both MSBuild and Visual Studio (preprocessor directives)
|
||||
These properties are defined 2X to ensure both MSBuild and Visual Studio (preprocessor directives)
|
||||
can correctly detect them.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
<!-- Compilation settings that explicitly differ from the Sdk.props/targets defaults -->
|
||||
<PropertyGroup>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Features>strict;IOperation</Features>
|
||||
<HighEntropyVA>true</HighEntropyVA>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="SixLabors" ToolsVersion="16.0">
|
||||
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
|
||||
<Rule Id="IDE0056" Action="None" />
|
||||
<Rule Id="IDE0057" Action="None" />
|
||||
</Rules>
|
||||
<RuleSet Name="SixLabors" ToolsVersion="17.0">
|
||||
<Rules AnalyzerId="Roslynator.CSharp.Analyzers" RuleNamespace="Roslynator.CSharp">
|
||||
<Rule Id="RCS1090" Action="None" />
|
||||
</Rules>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RuleSet Name="SixLabors.Tests" ToolsVersion="16.0">
|
||||
<RuleSet Name="SixLabors.Tests" ToolsVersion="17.0">
|
||||
<Include Path="sixlabors.ruleset" Action="Default" />
|
||||
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
|
||||
<Rule Id="CS1591" Action="None" />
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"documentationRules": {
|
||||
"xmlHeader": false,
|
||||
"documentInternalElements": false,
|
||||
"copyrightText": "Copyright (c) Six Labors.\nLicensed under the Apache License, Version 2.0."
|
||||
"copyrightText": "Copyright (c) Six Labors.\nLicensed under the Six Labors Split License."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче