mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
* [Analyzers] Remove duplicate pascal case style from .editorconfig * [Analyzers] Configured severity for individual IDE and CA rules showing as errors in VS Set severity for IDE0005, IDE0008, IDE0016, IDE0018, IDE0019, IDE0021, IDE0022, IDE0023, IDE0025, IDE0027, IDE0028, IDE0029, IDE0031, IDE0032, IDE0034, IDE0036, IDE0039, IDE0042, IDE0044, IDE0045, IDE0046, IDE0047, IDE0057, IDE0051, IDE0052, IDE0054, IDE0055, IDE0056, IDE0057, IDE0059, IDE0060, IDE0061, IDE0063, IDE0071, IDE0073, IDE0074, IDE0075, IDE0077, IDE0078, IDE0083, IDE0090, IDE0100, IDE0130, IDE160, IDE180, IDE0200, IDE0240, IDE0250, IDE0251, IDE0260, IDE0270, IDE0290, IDE0300, IDE0301, IDE0305, IDE1005, IDE1006, CA1859, CA2022, CA2263 * [Analyzers] Fix mismatched analyzer descriptions * [Analyzers] Fix misspelling * Update .editorconfig Made the following style rules `silent` instead of `suggestion`: - Use explicit type instead of 'var' - Use expression body for ... - Use block-scoped namespace * [Analyzers] Set IDE0290 to silent * [Analyzers] Remove IDE1006 configuration from .editorconfig in favor of making exclusions for the few entries * [Analyzers][Indexer] Add IDE1006 suppressions * [Analyzers][Peek] Add IDE1006 suppression * [Analyzers][MWB] Add IDE1006 suppression. * [Analyzers][Plugins] Add IDE1006 suppression * [Analyzers][ImageResizer] Suppress IDE0073 to retain original copyright * [Analyzers] Remove IDE0073 severity change in .editorconfig --------- Co-authored-by: Ani <115020168+drawbyperpetual@users.noreply.github.com>
268 lines
9.5 KiB
INI
268 lines
9.5 KiB
INI
[*.cs]
|
|
|
|
file_header_template = Copyright (c) Microsoft Corporation\r\nThe Microsoft Corporation licenses this file to you under the MIT license.\r\nSee the LICENSE file in the project root for more information.
|
|
|
|
# SA1201: Elements should appear in the correct order
|
|
dotnet_diagnostic.SA1201.severity = none
|
|
|
|
# CA1303: Do not pass literals as localized parameters
|
|
dotnet_diagnostic.CA1303.severity = suggestion
|
|
|
|
# CA1051: Do not declare visible instance fields
|
|
dotnet_code_quality.ca1051.exclude_structs = true
|
|
csharp_prefer_simple_using_statement = true:suggestion
|
|
csharp_prefer_braces = true:silent
|
|
csharp_style_namespace_declarations = block_scoped:silent
|
|
csharp_style_prefer_method_group_conversion = true:silent
|
|
csharp_style_expression_bodied_methods = false:silent
|
|
csharp_style_expression_bodied_constructors = false:silent
|
|
csharp_style_expression_bodied_operators = false:silent
|
|
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
|
csharp_style_expression_bodied_indexers = true:silent
|
|
csharp_style_expression_bodied_accessors = true:silent
|
|
csharp_style_expression_bodied_lambdas = true:silent
|
|
csharp_style_expression_bodied_local_functions = false:silent
|
|
csharp_style_throw_expression = true:suggestion
|
|
csharp_indent_labels = one_less_than_current
|
|
csharp_style_prefer_null_check_over_type_check = true:suggestion
|
|
[*.{cs,vb}]
|
|
#### Naming styles ####
|
|
|
|
# Naming rules
|
|
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
|
|
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
|
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
|
|
|
# Symbol specifications
|
|
|
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
dotnet_naming_symbols.interface.required_modifiers =
|
|
|
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
dotnet_naming_symbols.types.required_modifiers =
|
|
|
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
|
|
|
# Naming styles
|
|
|
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
|
dotnet_naming_style.begins_with_i.required_suffix =
|
|
dotnet_naming_style.begins_with_i.word_separator =
|
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
|
|
|
dotnet_naming_style.pascal_case.required_prefix =
|
|
dotnet_naming_style.pascal_case.required_suffix =
|
|
dotnet_naming_style.pascal_case.word_separator =
|
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
|
|
|
dotnet_style_coalesce_expression = true:suggestion
|
|
dotnet_style_null_propagation = true:suggestion
|
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
|
|
dotnet_style_prefer_auto_properties = true:silent
|
|
dotnet_style_object_initializer = false:suggestion
|
|
dotnet_style_collection_initializer = true:suggestion
|
|
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
|
|
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
|
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
|
dotnet_style_explicit_tuple_names = true:suggestion
|
|
dotnet_style_prefer_inferred_tuple_names = true:suggestion
|
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
|
|
dotnet_style_prefer_compound_assignment = true:suggestion
|
|
dotnet_style_prefer_simplified_interpolation = true:suggestion
|
|
dotnet_style_namespace_match_folder = true:suggestion
|
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
|
tab_width = 4
|
|
indent_size = 4
|
|
end_of_line = crlf
|
|
|
|
# IDE0065: using directive placement
|
|
dotnet_diagnostic.IDE0065.severity = none
|
|
|
|
# IDE0009: Add this or Me qualification
|
|
dotnet_diagnostic.IDE0009.severity = none
|
|
|
|
# IDE-based code analysis rules
|
|
# IDE0005: Remove unnecessary import
|
|
dotnet_diagnostic.IDE0005.severity = suggestion
|
|
|
|
# IDE0008: Use explicit type instead of 'var'
|
|
dotnet_diagnostic.IDE0008.severity = silent
|
|
|
|
# IDE0016: Use throw expression
|
|
dotnet_diagnostic.IDE0016.severity = suggestion
|
|
|
|
# IDE0018: Inline variable declaration
|
|
dotnet_diagnostic.IDE0018.severity = suggestion
|
|
|
|
# IDE0019: Use pattern matching
|
|
dotnet_diagnostic.IDE0019.severity = suggestion
|
|
|
|
# IDE0021: Use expression body for constructors
|
|
dotnet_diagnostic.IDE0021.severity = silent
|
|
|
|
# IDE0022: Use expression body for methods
|
|
dotnet_diagnostic.IDE0022.severity = silent
|
|
|
|
# IDE0023: Use expression body for conversion operators
|
|
dotnet_diagnostic.IDE0023.severity = silent
|
|
|
|
# IDE0025: Use expression body for properties
|
|
dotnet_diagnostic.IDE0025.severity = silent
|
|
|
|
# IDE0027: Use expression body for accessors
|
|
dotnet_diagnostic.IDE0027.severity = silent
|
|
|
|
# IDE0028: Use collection initializers
|
|
dotnet_diagnostic.IDE0028.severity = suggestion
|
|
|
|
# IDE0029: Null check can be simplified
|
|
dotnet_diagnostic.IDE0029.severity = suggestion
|
|
|
|
# IDE0031: Use null propagation
|
|
dotnet_diagnostic.IDE0031.severity = suggestion
|
|
|
|
# IDE0032: Use auto property
|
|
dotnet_diagnostic.IDE0032.severity = suggestion
|
|
|
|
# IDE0034: Simplify default expression
|
|
dotnet_diagnostic.IDE0034.severity = suggestion
|
|
|
|
# IDE0036: Order modifiers
|
|
dotnet_diagnostic.IDE0036.severity = suggestion
|
|
|
|
# IDE0039: Use local function instead of lambda
|
|
dotnet_diagnostic.IDE0039.severity = suggestion
|
|
|
|
# IDE0042: Deconstruct variable declaration
|
|
dotnet_diagnostic.IDE0042.severity = suggestion
|
|
|
|
# IDE0044: Add readonly modifier
|
|
dotnet_diagnostic.IDE0044.severity = suggestion
|
|
|
|
# IDE0045: Use conditional expression for assignment
|
|
dotnet_diagnostic.IDE0045.severity = suggestion
|
|
|
|
# IDE0046: Use conditional expression for return
|
|
dotnet_diagnostic.IDE0046.severity = suggestion
|
|
|
|
# IDE0047: Remove unnecessary parentheses
|
|
dotnet_diagnostic.IDE0047.severity = suggestion
|
|
|
|
# IDE0051: Remove unused private member
|
|
dotnet_diagnostic.IDE0051.severity = suggestion
|
|
|
|
# IDE0052: Remove unread private member
|
|
dotnet_diagnostic.IDE0052.severity = suggestion
|
|
|
|
# IDE0054: Use compound assignment
|
|
dotnet_diagnostic.IDE0054.severity = suggestion
|
|
|
|
# IDE0055: Fix formatting
|
|
dotnet_diagnostic.IDE0055.severity = suggestion
|
|
|
|
# IDE0056: Use index operator
|
|
dotnet_diagnostic.IDE0056.severity = suggestion
|
|
|
|
# IDE0057: Use range operator
|
|
dotnet_diagnostic.IDE0057.severity = suggestion
|
|
|
|
# IDE0059: Remove unnecessary value assignment
|
|
dotnet_diagnostic.IDE0059.severity = suggestion
|
|
|
|
# IDE0060: Remove unused parameter
|
|
dotnet_diagnostic.IDE0060.severity = suggestion
|
|
|
|
# IDE0061: Use expression body for local functions
|
|
dotnet_diagnostic.IDE0061.severity = silent
|
|
|
|
# IDE0063: Use simple 'using' statement
|
|
dotnet_diagnostic.IDE0063.severity = suggestion
|
|
|
|
# IDE0071: Simplify interpolation
|
|
dotnet_diagnostic.IDE0071.severity = suggestion
|
|
|
|
# IDE0074: Use coalesce compound assignment
|
|
dotnet_diagnostic.IDE0074.severity = suggestion
|
|
|
|
# IDE0075: Simplify conditional expression
|
|
dotnet_diagnostic.IDE0075.severity = suggestion
|
|
|
|
# IDE0077: Avoid legacy format target in global 'SuppressMessageAttribute'
|
|
dotnet_diagnostic.IDE0077.severity = suggestion
|
|
|
|
# IDE0078: Use pattern matching
|
|
dotnet_diagnostic.IDE0078.severity = suggestion
|
|
|
|
# IDE0083: Use pattern matching ('not' operator)
|
|
dotnet_diagnostic.IDE0083.severity = suggestion
|
|
|
|
# IDE0090: Simplify 'new' expression
|
|
dotnet_diagnostic.IDE0090.severity = suggestion
|
|
|
|
# IDE0100: Remove unnecessary equality operator
|
|
dotnet_diagnostic.IDE0100.severity = suggestion
|
|
|
|
# IDE0130: Namespace does not match folder structure
|
|
dotnet_diagnostic.IDE0130.severity = suggestion
|
|
|
|
# IDE0160: Use block-scoped namespace
|
|
dotnet_diagnostic.IDE0160.severity = silent
|
|
|
|
# IDE0180: Use tuple to swap values
|
|
dotnet_diagnostic.IDE0180.severity = suggestion
|
|
|
|
# IDE0200: Remove unnecessary lambda expression
|
|
dotnet_diagnostic.IDE0200.severity = suggestion
|
|
|
|
# IDE0240: Nullable directive is redundant
|
|
dotnet_diagnostic.IDE0240.severity = suggestion
|
|
|
|
# IDE0250: Struct can be made 'readonly'
|
|
dotnet_diagnostic.IDE0250.severity = suggestion
|
|
|
|
# IDE0251: Member can be made 'readonly''
|
|
dotnet_diagnostic.IDE0251.severity = suggestion
|
|
|
|
# IDE0260: Use pattern matching
|
|
dotnet_diagnostic.IDE0260.severity = suggestion
|
|
|
|
# IDE0270: Null check can be simplified
|
|
dotnet_diagnostic.IDE0270.severity = suggestion
|
|
|
|
# IDE0290: Use primary constructor
|
|
dotnet_diagnostic.IDE0290.severity = silent
|
|
|
|
# IDE0300: Use collection expression for array
|
|
dotnet_diagnostic.IDE0300.severity = suggestion
|
|
|
|
# IDE0301: Use collection expression for empty
|
|
dotnet_diagnostic.IDE0301.severity = suggestion
|
|
|
|
# IDE0305: Use collection expression for fluent
|
|
dotnet_diagnostic.IDE0305.severity = suggestion
|
|
|
|
# IDE1005: Use conditional delegate call
|
|
dotnet_diagnostic.IDE1005.severity = suggestion
|
|
|
|
# CA1859: Use concrete types when possible for improved performance
|
|
dotnet_diagnostic.CA1859.severity = suggestion
|
|
|
|
# CA2202: Avoid inexact read with Stream.Read
|
|
dotnet_diagnostic.CA2022.severity = suggestion
|
|
|
|
# CA2263: Prefer generic overload when type is known
|
|
dotnet_diagnostic.CA2263.severity = suggestion
|