mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
* Upgraded projects to target .NET 8 * Updated .NET runtime package targets to use latest .NET 8 build * Updated PowerToys Interop to target .NET 8 * Switch to use ArgumentNullException.ThrowIfNull * ArgumentNullException.ThrowIfNull for CropAndLockViewModel * Switching to ObjectDisposedException.ThrowIf * Upgrade System.ComponentModel.Composition to 8.0 * ArgumentNullException.ThrowIfNull in Helper * Switch to StartsWith using StringComparison.Ordinal * Disabled CA1859, CA1716, SYSLIB1096 analyzers * Update RIDs to reflect breaking changes in .NET 8 * Updated Microsoft NuGet packages to RC1 * Updated Analyzer package to latest .NET 8 preview package * CA1854: Use TryGetValue instead of ContainsKey * [Build] Update TFM to .NET 8 for publish profiles * [Analyzers] Remove CA1309, CA1860-CA1865, CA1869, CA2208 from warning. * [Analyzers] Fix for C26495 * [Analyzers] Disable CS1615, CS9191 * [CI] Target .NET 8 in YAML * [CI] Add .NET preview version flag temporarily. * [FileLocksmith] Update TFM to .NET 8 * [CI] Switch to preview agent * [CI] Update NOTICE.md * [CI] Update Release to target .NET 8 and use Preview agent * [Analyzers] Disable CA1854 * Fix typo * Updated Microsoft.CodeAnalysis.NetAnalyzers to latest preview Updated packages to rc2 * [Analyzers][CPP] Turn off warning for 5271 * [Analyzers][CPP] Turn off warning for 26493 * [KeyboardListener] Add mutex include to resolve error * [PT Run][Folder] Use static SearchValues to resolve CA1870 * [PowerLauncher] Fix TryGetValue * [MouseJumpSettings] Use ArgumentNullException.ThrowIfNull * [Build] Disable parallel dotnet tool restore * [Build] No cache of dotnet tool packages * [Build] Temporarily move .NET 8 SDK task before XAML formatting * [Build][Temp] Try using .NET 7 prior to XAML formatting and then switch to .NET 8 after * [Build] Use .NET 6 for XAML Styler * [CI] Updated NOTICE.md * [FancyZones] Update TFM to .NET 8 * [EnvVar] Update TFM to .NET 8 and update RID * [EnvVar] Use ArgumentNullException.ThrowIfNull * [Dev] Updated packages to .NET 8 RTM version * [Dev] Updated Microsoft.CodeAnalysis.NetAnalyzers to latest * [CI] Updated NOTICE.md with latest package versions * Fix new utility target fameworks and runtimeids * Don't use preview images anymore * [CI] Add script to update VCToolsVersion environment variable * [CI] Add Step to Verify VCToolsVersion * [CI] Use latest flag for vswhere to set proper VCToolsVersion * Add VCToolsVersion checking to release.yml * Remove net publishing from local/ PR CI builds * Revert "Remove net publishing from local/ PR CI builds" This reverts commitf469778996. * Only publish necessary projects * Add verbosity to release pipelines builds of PowerTOys * Set VCToolsVersion for publish.cmd when called from installer * [Installer] Moved project publish logic to MSBuild Task * [CI] Revert using publish.cmd * [CI] Set VCToolsVersion and unset ClearDevCommandPromptEnvVars property * Installer publishes for x64 too * Revert "Add verbosity to release pipelines builds of PowerTOys" This reverts commit654d4a7f78. * [Dev] Update CodeAnalysis library to non-preview package * Remove unneeded warning removal * Fix Notice.md * Rename VCToolsVersion file and task name * Remove unneeded mutex header include --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
145 lines
6.4 KiB
INI
145 lines
6.4 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_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
|
|
|
|
# CA1859: Change type for improved performance
|
|
dotnet_diagnostic.CA1859.severity = none
|
|
|
|
# CA1716: Identifiers should not match keywords
|
|
dotnet_diagnostic.CA1716.severity = none
|
|
|
|
# SYSLIB1096: Convert to 'GeneratedComInterface'
|
|
dotnet_diagnostic.SYSLIB1096.severity = silent
|
|
|
|
# CA1309: Use ordinal StringComparison
|
|
dotnet_diagnostic.CA1309.severity = suggestion
|
|
|
|
# CS1615: Argument may not be passed with the ref keyword
|
|
dotnet_diagnostic.CS1615.severity = none
|
|
|
|
# CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
|
|
dotnet_diagnostic.CA1854.severity = suggestion
|
|
|
|
# CA1860: Avoid using 'Enumerable.Any()' extension method
|
|
dotnet_diagnostic.CA1860.severity = suggestion
|
|
|
|
# CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array
|
|
dotnet_diagnostic.CA1861.severity = suggestion
|
|
|
|
# CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons
|
|
dotnet_diagnostic.CA1862.severity = suggestion
|
|
|
|
# CA1863: Cache a CompositeFormat for repeated use in this formatting operation
|
|
dotnet_diagnostic.CA1863.severity = none
|
|
|
|
# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
|
|
dotnet_diagnostic.CA1864.severity = suggestion
|
|
|
|
# CA1865: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
|
|
dotnet_diagnostic.CA1865.severity = suggestion
|
|
|
|
# CA1869: Cache and reuse 'JsonSerializerOptions' instances
|
|
dotnet_diagnostic.CA1869.severity = none
|
|
|
|
# CA2208: Instantiate argument exceptions correctly
|
|
dotnet_diagnostic.CA2208.severity = none
|
|
|
|
# CS9191: The 'ref' modifier for argument corresponding to 'in' is equivalent to 'in'. Consider using 'in' instead.
|
|
dotnet_diagnostic.CS9191.severity = none
|