Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -214,15 +217,15 @@ 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
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
Expand All @@ -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
Expand All @@ -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____
Expand Down
4 changes: 2 additions & 2 deletions msbuild/props/SixLabors.Global.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 1 addition & 5 deletions sixlabors.ruleset
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
2 changes: 1 addition & 1 deletion sixlabors.tests.ruleset
Original file line number Diff line number Diff line change
@@ -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" />
Expand Down
2 changes: 1 addition & 1 deletion stylecop.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
}