|
1 | 1 | # To learn more about .editorconfig see https://aka.ms/editorconfigdocs |
| 2 | +# BEGIN COPY FROM https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options#example-editorconfig-file |
2 | 3 | ############################### |
3 | 4 | # Core EditorConfig Options # |
4 | 5 | ############################### |
| 6 | +root = true |
5 | 7 | # All files |
6 | 8 | [*] |
7 | 9 | indent_style = space |
@@ -58,7 +60,7 @@ dotnet_style_prefer_conditional_expression_over_return = true:silent |
58 | 60 | ############################### |
59 | 61 | # Style Definitions |
60 | 62 | dotnet_naming_style.pascal_case_style.capitalization = pascal_case |
61 | | -# Use PascalCase for constant fields |
| 63 | +# Use PascalCase for constant fields |
62 | 64 | dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion |
63 | 65 | dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields |
64 | 66 | dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style |
@@ -92,7 +94,7 @@ csharp_preferred_modifier_order = public,private,protected,internal,static,exter |
92 | 94 | csharp_prefer_braces = true:silent |
93 | 95 | csharp_style_deconstructed_variable_declaration = true:suggestion |
94 | 96 | csharp_prefer_simple_default_expression = true:suggestion |
95 | | -csharp_style_pattern_local_over_anonymous_function = true:suggestion |
| 97 | +csharp_style_prefer_local_over_anonymous_function = true:suggestion |
96 | 98 | csharp_style_inlined_variable_declaration = true:suggestion |
97 | 99 | ############################### |
98 | 100 | # C# Formatting Rules # |
@@ -130,3 +132,29 @@ csharp_preserve_single_line_blocks = true |
130 | 132 | [*.vb] |
131 | 133 | # Modifier preferences |
132 | 134 | visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion |
| 135 | +# END COPY |
| 136 | + |
| 137 | +################################# |
| 138 | +# Open Rails Coding Conventions # |
| 139 | +################################# |
| 140 | +[*.cs] |
| 141 | + |
| 142 | +# .NET analyzers |
| 143 | +dotnet_style_require_accessibility_modifiers = omit_if_default:silent |
| 144 | +dotnet_naming_symbols.all_fields.applicable_kinds = field |
| 145 | +dotnet_naming_symbols.all_fields.applicable_accessibilities = * |
| 146 | +dotnet_naming_rule.all_fields_should_be_pascal_case.symbols = all_fields |
| 147 | +dotnet_naming_rule.all_fields_should_be_pascal_case.style = pascal_case_style |
| 148 | +dotnet_naming_rule.all_fields_should_be_pascal_case.severity = warning |
| 149 | + |
| 150 | +# StyleCop analyzers |
| 151 | +dotnet_diagnostic.SA1101.severity = none # Readability: PrefixLocalCallsWithThis |
| 152 | +dotnet_diagnostic.SA1200.severity = none # Ordering: UsingDirectivesMustBePlacedCorrectly |
| 153 | +dotnet_diagnostic.SA1306.severity = none # Naming: FieldNamesMustBeginWithLowerCaseLetter |
| 154 | +dotnet_diagnostic.SA1400.severity = none # Maintainability: AccessModifierMustBeDeclared |
| 155 | +dotnet_diagnostic.SA1401.severity = none # Maintainability: FieldsMustBePrivate |
| 156 | +dotnet_diagnostic.SA1402.severity = none # Maintainability: FileMayOnlyContainASingleType |
| 157 | +dotnet_diagnostic.SA1600.severity = none # Documentation: ElementsMustBeDocumented |
| 158 | +dotnet_diagnostic.SA1602.severity = none # Documentation: EnumerationItemsMustBeDocumented |
| 159 | +dotnet_diagnostic.SA1633.severity = none # Documentation: FileMustHaveHeader |
| 160 | +dotnet_diagnostic.SA1649.severity = none # Documentation: FileNameMustMatchTypeName |
0 commit comments