diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3284df4f09..4d1c54a8f1 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ + # Analyzer Configuration -Starting with version `2.6.3`, all the analyzer NuGet packages produced in this repo, including the FxCop Analyzers NuGet package, support _.editorconfig based analyzer configuration_. End users can configure the behavior of specific CA rule(s) OR all configurable CA rules by specifying supported key-value pair options in an `.editorconfig` file. You can read more about `.editorconfig` format [here](https://editorconfig.org/). +All the analyzer NuGet packages produced in this repo support _.editorconfig based analyzer configuration_. End users can configure the behavior of specific CA rule(s) OR all configurable CA rules by specifying supported key-value pair options in an `.editorconfig` file. You can read more about `.editorconfig` format [here](https://editorconfig.org/). ## .editorconfig format -Analyzer configuration options from an .editorconfig file are parsed into _general_ and _specific_ configuration options. General configuration enables configuring the behavior of all CA rules for which the provided option is valid. Specific configuration enables configuring each CA rule ID or CA rules belonging to each rule category, such as 'Naming', 'Design', 'Performance', etc. or CA rules with a specific custom tag, such as 'Dataflow'. Our options are _case-insensitive_. Below are the supported formats: +Analyzer configuration options from an `.editorconfig` file are parsed into _general_ and _specific_ configuration options. General configuration enables configuring the behavior of all CA rules for which the provided option is valid. Specific configuration enables configuring each CA rule ID or CA rules belonging to each rule category, such as `Naming`, `Design`, `Performance`, etc. or CA rules with a specific custom tag, such as `Dataflow`. Our options are _case-insensitive_. Below are the supported formats: 1. General configuration option: 1. `dotnet_code_quality.OptionName = OptionValue` @@ -26,12 +28,12 @@ For example, end users can configure the analyzed API surface for analyzers usin ### VS2019 16.3 and later + Analyzer package version 3.3.x and later -End users can enable .editorconfig based configuration for individual documents, folders, projects, solution or entire repo by creating an .editorconfig file with the options in the corresponding directory. This file can also contain .editorconfig based diagnostic severity configuration entries. See [here](https://docs.microsoft.com/visualstudio/code-quality/use-roslyn-analyzers#rule-severity) for more details. +End users can enable `.editorconfig` based configuration for individual documents, folders, projects, solution or entire repo by creating an `.editorconfig` file with the options in the corresponding directory. This file can also contain `.editorconfig` based diagnostic severity configuration entries. See [here](https://docs.microsoft.com/visualstudio/code-quality/use-roslyn-analyzers#rule-severity) for more details. ### Prior to VS2019 16.3 or using an analyzer package version prior to 3.3.x -1. Per-project .editorconfig file: End users can enable .editorconfig based configuration for individual projects by just copying the .editorconfig file with the options to the project root directory. -2. Shared .editorconfig file: If you would like to share a common .editorconfig file between projects, say `<%PathToSharedEditorConfig%>\.editorconfig`, then you should add the following MSBuild property group and item group to a shared props file that is imported _before_ the FxCop analyzer props files (that come from the FxCop analyzer NuGet package reference): +1. Per-project `.editorconfig` file: End users can enable `.editorconfig` based configuration for individual projects by just copying the `.editorconfig` file with the options to the project root directory. +2. Shared `.editorconfig` file: If you would like to share a common `.editorconfig` file between projects, say `<%PathToSharedEditorConfig%>\.editorconfig`, then you should add the following MSBuild property group and item group to a shared props file that is imported _before_ the FxCop analyzer props files (that come from the FxCop analyzer NuGet package reference): ```xml @@ -46,7 +48,7 @@ Note that this additional file based approach is also supported on VS2019 16.3 a ## Supported .editorconfig options -This section documents the list of supported .editorconfig key-value options for CA rules. +This section documents the list of supported `.editorconfig` key-value options for CA rules. ### Analyzed API surface @@ -127,9 +129,9 @@ Option Name: `output_kind` Configurable Rules: [CA2007](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007) -Option Values: One or more fields of enum [Microsoft.CodeAnalysis.CompilationOptions.OutputKind](http://source.roslyn.io/#q=Microsoft.CodeAnalysis.OutputKind) as a comma separated list. +Option Values: One or more fields of enum [Microsoft.CodeAnalysis.CompilationOptions.OutputKind](https://docs.microsoft.com/dotnet/api/microsoft.codeanalysis.outputkind) as a comma separated list. -Default Value: All output kinds +Default Value: _All output kinds_ Example: `dotnet_code_quality.CA2007.output_kind = ConsoleApplication, DynamicallyLinkedLibrary` @@ -144,19 +146,19 @@ Option Values: Comma separated listed of one or more modifier values from the be | Option Value | Summary | | --- | --- | | `none` | No modifier requirement. | -| `static` or `Shared` | Must be declared as 'static' ('Shared' in Visual Basic). | -| `const` | Must be declared as 'const'. | -| `readonly` | Must be declared as 'readonly'. | -| `abstract` | Must be declared as 'abstract'. | -| `virtual` | Must be declared as 'virtual'. | -| `override` | Must be declared as 'override'. | -| `sealed` | Must be declared as 'sealed'. | -| `extern` | Must be declared as 'extern'. | -| `async` | Must be declared as 'async'. | +| `static` or `Shared` | Must be declared as `static` (`Shared` in Visual Basic). | +| `const` | Must be declared as `const`. | +| `readonly` | Must be declared as `readonly`. | +| `abstract` | Must be declared as `abstract`. | +| `virtual` | Must be declared as `virtual`. | +| `override` | Must be declared as `override`. | +| `sealed` | Must be declared as `sealed`. | +| `extern` | Must be declared as `extern`. | +| `async` | Must be declared as `async`. | Default Value: Depends on each configurable rule: - 1. CA1802: default value is 'static'. Set the value to 'none' to allow flagging instance fields. + 1. CA1802: default value is `static`. Set the value to `none` to allow flagging instance fields. Example: `dotnet_code_quality.CA1802.required_modifiers = none`. @@ -202,23 +204,23 @@ Option Name: `null_check_validation_methods` Configurable Rules: [CA1062](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062) -Option Values: Names of null check validation methods (separated by '|') that validate arguments passed to the method are non-null. +Option Values: Names of null check validation methods (separated by `|`) that validate arguments passed to the method are non-null. Allowed method name formats: - 1. Method name only (includes all methods with the name, regardless of the containing type or namespace) + 1. Method name only (includes all methods with the name, regardless of the containing type or namespace). 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) - with an optional "M:" prefix. + with an optional `M:` prefix. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.null_check_validation_methods = Validate` | Matches all methods named 'Validate' in the compilation -|`dotnet_code_quality.null_check_validation_methods = Validate1\|Validate2` | Matches all methods named either 'Validate1' or 'Validate2' in the compilation -|`dotnet_code_quality.null_check_validation_methods = NS.MyType.Validate(ParamType)` | Matches specific method 'Validate' with given fully qualified signature -|`dotnet_code_quality.null_check_validation_methods = NS1.MyType1.Validate1(ParamType)\|NS2.MyType2.Validate2(ParamType)` | Matches specific methods 'Validate1' and 'Validate2' with respective fully qualified signature +| `dotnet_code_quality.null_check_validation_methods = Validate` | Matches all methods named `Validate` in the compilation. | +| `dotnet_code_quality.null_check_validation_methods = Validate1\|Validate2` | Matches all methods named either `Validate1` or `Validate2` in the compilation. | +| `dotnet_code_quality.null_check_validation_methods = NS.MyType.Validate(ParamType)` | Matches specific method `Validate` with given fully qualified signature. | +| `dotnet_code_quality.null_check_validation_methods = NS1.MyType1.Validate1(ParamType)\|NS2.MyType2.Validate2(ParamType)` | Matches specific methods `Validate1` and `Validate2` with respective fully qualified signature. | ### Additional string formatting methods @@ -226,32 +228,32 @@ Option Name: `additional_string_formatting_methods` Configurable Rules: [CA2241](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241) -Option Values: Names of additional string formatting methods (separated by '|'). +Option Values: Names of additional string formatting methods (separated by `|`). Allowed method name formats: - 1. Method name only (includes all methods with the name, regardless of the containing type or namespace) + 1. Method name only (includes all methods with the name, regardless of the containing type or namespace). 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) - with an optional "M:" prefix. + with an optional `M:` prefix. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.additional_string_formatting_methods = MyFormat` | Matches all methods named 'MyFormat' in the compilation -|`dotnet_code_quality.additional_string_formatting_methods = MyFormat1\|MyFormat2` | Matches all methods named either 'MyFormat1' or 'MyFormat2' in the compilation -|`dotnet_code_quality.additional_string_formatting_methods = NS.MyType.MyFormat(ParamType)` | Matches specific method 'MyFormat' with given fully qualified signature -|`dotnet_code_quality.additional_string_formatting_methods = NS1.MyType1.MyFormat1(ParamType)\|NS2.MyType2.MyFormat2(ParamType)` | Matches specific methods 'MyFormat1' and 'MyFormat2' with respective fully qualified signature +| `dotnet_code_quality.additional_string_formatting_methods = MyFormat` | Matches all methods named `MyFormat` in the compilation. | +| `dotnet_code_quality.additional_string_formatting_methods = MyFormat1\|MyFormat2` | Matches all methods named either `MyFormat1` or `MyFormat2` in the compilation. | +| `dotnet_code_quality.additional_string_formatting_methods = NS.MyType.MyFormat(ParamType)` | Matches specific method `MyFormat` with given fully qualified signature. | +| `dotnet_code_quality.additional_string_formatting_methods = NS1.MyType1.MyFormat1(ParamType)\|NS2.MyType2.MyFormat2(ParamType)` | Matches specific methods `MyFormat1` and `MyFormat2` with respective fully qualified signature. | Option Name: `try_determine_additional_string_formatting_methods_automatically` Boolean option to enable heuristically detecting of additional string formatting methods -A method is considered a string formatting method if it has a 'string format' parameter followed by a 'params object[]' parameter. +A method is considered a string formatting method if it has a `string format` parameter followed by a `params object[]` parameter. Configurable Rules: [CA2241](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `false` @@ -262,6 +264,7 @@ Example: `dotnet_code_quality.try_determine_additional_string_formatting_methods Configurable Rules: [CA1001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001), [CA1062](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062), +[CA1068](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068), [CA1303](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303), [CA1304](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304), [CA1508](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508), @@ -307,30 +310,30 @@ Configurable Rules: Option Name: `excluded_symbol_names` -Option Values: Names of symbols (separated by '|') that are excluded for analysis. +Option Values: Names of symbols (separated by `|`) that are excluded for analysis. Allowed symbol name formats: - 1. Symbol name (includes all symbols with the name, regardless of the containing type or name3pace) - 2. Symbol name ending with a wildcard symbol (includes all symbols whose name starts with the given name, regardless of the containing type or namespace) + 1. Symbol name (includes all symbols with the name, regardless of the containing type or namespace). + 2. Symbol name ending with a wildcard symbol (includes all symbols whose name starts with the given name, regardless of the containing type or namespace). 3. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format). - Note that each symbol name requires a symbol kind prefix, such as "M:" prefix for methods, "T:" prefix for types, "N:" prefix for namespaces, etc. + Note that each symbol name requires a symbol kind prefix, such as `M:` prefix for methods, `T:` prefix for types, `N:` prefix for namespaces, etc. 4. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) and ending with the wildcard symbol. - Note that each symbol name requires a symbol kind prefix, such as "M:" prefix for methods, "T:" prefix for types, "N:" prefix for namespaces, etc. - 5. `.ctor` for constructors and `.cctor` for static constructors + Note that each symbol name requires a symbol kind prefix, such as `M:` prefix for methods, `T:` prefix for types, `N:` prefix for namespaces, etc. + 5. `.ctor` for constructors and `.cctor` for static constructors. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.excluded_symbol_names = Validate` | Matches all symbols named 'Validate' in the compilation -|`dotnet_code_quality.excluded_symbol_names = Validate1\|Validate2` | Matches all symbols named either 'Validate1' or 'Validate2' in the compilation -|`dotnet_code_quality.excluded_symbol_names = M:NS.MyType.Validate(ParamType)` | Matches specific method 'Validate' with given fully qualified signature -|`dotnet_code_quality.excluded_symbol_names = M:NS1.MyType1.Validate1(ParamType)\|M:NS2.MyType2.Validate2(ParamType)` | Matches specific methods 'Validate1' and 'Validate2' with respective fully qualified signature -|`dotnet_code_quality.excluded_symbol_names = My*` | Matches all symbols whose name starts with 'My' | -|`dotnet_code_quality.excluded_symbol_names = T:NS.My*` | Matches all type symbols whose name starts with 'My' in the namespace 'NS' | -|`dotnet_code_quality.excluded_symbol_names = N:My*` | Matches all symbols whose containing namespace starts with 'My' | +| `dotnet_code_quality.excluded_symbol_names = Validate` | Matches all symbols named `Validate` in the compilation. | +| `dotnet_code_quality.excluded_symbol_names = Validate1\|Validate2` | Matches all symbols named either `Validate1` or `Validate2` in the compilation. | +| `dotnet_code_quality.excluded_symbol_names = M:NS.MyType.Validate(ParamType)` | Matches specific method `Validate` with given fully qualified signature. | +| `dotnet_code_quality.excluded_symbol_names = M:NS1.MyType1.Validate1(ParamType)\|M:NS2.MyType2.Validate2(ParamType)` | Matches specific methods `Validate1` and `Validate2` with respective fully qualified signature. | +| `dotnet_code_quality.excluded_symbol_names = My*` | Matches all symbols whose name starts with `My`. | +| `dotnet_code_quality.excluded_symbol_names = T:NS.My*` | Matches all type symbols whose name starts with `My` in the namespace `NS`. | +| `dotnet_code_quality.excluded_symbol_names = N:My*` | Matches all symbols whose containing namespace starts with `My`. | Additionally, all the dataflow analysis based rules can be configured with a single entry `dotnet_code_quality.dataflow.excluded_symbol_names = ...` @@ -338,24 +341,24 @@ Additionally, all the dataflow analysis based rules can be configured with a sin Option Name: `excluded_type_names_with_derived_types` -Option Values: Names of types (separated by '|'), such that the type and all its derived types are excluded for analysis. +Option Values: Names of types (separated by `|`), such that the type and all its derived types are excluded for analysis. Allowed symbol name formats: - 1. Type name only (includes all types with the name, regardless of the containing type or namespace) - 2. Type name only ending with the wildcard symbol (includes all types whose name starts with the given name, regardless of the containing type or namespace) - 3. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional "T:" prefix. - 4. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional "T:" prefix and ending with the wildcard symbol. + 1. Type name only (includes all types with the name, regardless of the containing type or namespace). + 2. Type name only ending with the wildcard symbol (includes all types whose name starts with the given name, regardless of the containing type or namespace). + 3. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional `T:` prefix. + 4. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional `T:` prefix and ending with the wildcard symbol. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.excluded_type_names_with_derived_types = MyType` | Matches all types named 'MyType' and all of its derived types in the compilation -|`dotnet_code_quality.excluded_type_names_with_derived_types = MyType1\|MyType2` | Matches all types named either 'MyType1' or 'MyType2' and all of their derived types in the compilation -|`dotnet_code_quality.excluded_type_names_with_derived_types = T:NS.MyType` | Matches specific type 'MyType' with given fully qualified name and all of its derived types -|`dotnet_code_quality.excluded_type_names_with_derived_types = T:NS1.MyType1\|M:NS2.MyType2` | Matches specific types 'MyType1' and 'MyType2' with respective fully qualified names and all of their derived types +| `dotnet_code_quality.excluded_type_names_with_derived_types = MyType` | Matches all types named `MyType` and all of its derived types in the compilation. | +| `dotnet_code_quality.excluded_type_names_with_derived_types = MyType1\|MyType2` | Matches all types named either `MyType1` or `MyType2` and all of their derived types in the compilation. | +| `dotnet_code_quality.excluded_type_names_with_derived_types = T:NS.MyType` | Matches specific type `MyType` with given fully qualified name and all of its derived types. | +| `dotnet_code_quality.excluded_type_names_with_derived_types = T:NS1.MyType1\|M:NS2.MyType2` | Matches specific types `MyType1` and `MyType2` with respective fully qualified names and all of their derived types. | ### Unsafe DllImportSearchPath bits when using DefaultDllImportSearchPaths attribute @@ -363,9 +366,9 @@ Option Name: `unsafe_DllImportSearchPath_bits` Configurable Rules: [CA5393](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5393) -Option Values: Integer values of System.Runtime.InteropServices.DllImportSearchPath +Option Values: Integer values of `System.Runtime.InteropServices.DllImportSearchPath` -Default Value: '770', which is AssemblyDirectory | UseDllDirectoryForDependencies | ApplicationDirectory +Default Value: `770` (i.e. `AssemblyDirectory | UseDllDirectoryForDependencies | ApplicationDirectory`) Example: `dotnet_code_quality.CA5393.unsafe_DllImportSearchPath_bits = 770` @@ -375,7 +378,7 @@ Option Name: `exclude_aspnet_core_mvc_controllerbase` Configurable Rules: [CA5391](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5391) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `true` @@ -387,24 +390,24 @@ Option Name: `disallowed_symbol_names` Configurable Rules: [CA1031](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031) -Option Values: Names of symbols (separated by '|') that are disallowed in the context of the analysis. +Option Values: Names of symbols (separated by `|`) that are disallowed in the context of the analysis. Allowed symbol name formats: - 1. Symbol name only (includes all symbols with the name, regardless of the containing type or namespace) + 1. Symbol name only (includes all symbols with the name, regardless of the containing type or namespace). 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format). - Note that each symbol name requires a symbol kind prefix, such as "M:" prefix for methods, "T:" prefix for types, "N:" prefix for namespaces, etc. - 3. `.ctor` for constructors and `.cctor` for static constructors + Note that each symbol name requires a symbol kind prefix, such as `M:` prefix for methods, `T:` prefix for types, `N:` prefix for namespaces, etc. + 3. `.ctor` for constructors and `.cctor` for static constructors. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.disallowed_symbol_names = Validate` | Matches all symbols named 'Validate' in the compilation -|`dotnet_code_quality.disallowed_symbol_names = Validate1\|Validate2` | Matches all symbols named either 'Validate1' or 'Validate2' in the compilation -|`dotnet_code_quality.disallowed_symbol_names = M:NS.MyType.Validate(ParamType)` | Matches specific method 'Validate' with given fully qualified signature -|`dotnet_code_quality.disallowed_symbol_names = M:NS1.MyType1.Validate1(ParamType)\|M:NS2.MyType2.Validate2(ParamType)` | Matches specific methods 'Validate1' and 'Validate2' with respective fully qualified signature +| `dotnet_code_quality.disallowed_symbol_names = Validate` | Matches all symbols named `Validate` in the compilation. | +| `dotnet_code_quality.disallowed_symbol_names = Validate1\|Validate2` | Matches all symbols named either `Validate1` or `Validate2` in the compilation. | +| `dotnet_code_quality.disallowed_symbol_names = M:NS.MyType.Validate(ParamType)` | Matches specific method `Validate` with given fully qualified signature. | +| `dotnet_code_quality.disallowed_symbol_names = M:NS1.MyType1.Validate1(ParamType)\|M:NS2.MyType2.Validate2(ParamType)` | Matches specific methods `Validate1` and `Validate2` with respective fully qualified signature. | ### Dataflow analysis @@ -429,7 +432,7 @@ Option Values: | `NonContextSensitive` | Performs non-context sensitive interprocedural analysis for all source method invocations. | | `ContextSensitive` | Performs context sensitive interprocedural analysis for all source method invocations. | -Default Value: Specific to each configurable rule. +Default Value: _Specific to each configurable rule_ Example: `dotnet_code_quality.interprocedural_analysis_kind = ContextSensitive` @@ -439,7 +442,7 @@ Option Name: `max_interprocedural_method_call_chain` Option Values: Unsigned integer -Default Value: 3 +Default Value: `3` Example: `dotnet_code_quality.max_interprocedural_method_call_chain = 5` @@ -449,7 +452,7 @@ Option Name: `max_interprocedural_lambda_or_local_function_call_chain` Option Values: Unsigned integer -Default Value: 3 +Default Value: `3` Example: `dotnet_code_quality.max_interprocedural_lambda_or_local_function_call_chain = 5` @@ -468,7 +471,7 @@ Option Values: | `NonExceptionPaths` | Track and report missing dispose violations only on non-exception program paths. Additionally, also flag use of non-recommended dispose patterns that may cause potential dispose leaks. | | `NonExceptionPathsOnlyNotDisposed` | Track and report missing dispose violations only on non-exception program paths. Do not flag use of non-recommended dispose patterns that may cause potential dispose leaks. | -Default Value: `NonExceptionPaths`. +Default Value: `NonExceptionPaths` Example: `dotnet_code_quality.dispose_analysis_kind = AllPaths` @@ -551,7 +554,7 @@ Option Values: | `PartialWithoutTrackingFieldsAndProperties` | Partial analysis that does not track PointsToData for fields and properties for improved performance. | | `Complete` | Complete analysis that also tracks PointsToData for fields and properties. | -Default Value: Depends on each rule. +Default Value: _Specific to each configurable rule_ Example: `dotnet_code_quality.points_to_analysis_kind = Complete` @@ -561,7 +564,7 @@ Option Name: `copy_analysis` Option Values: `true` or `false` -Default Value: Specific to each configurable rule ('true' by default for most rules) +Default Value: _Specific to each configurable rule_ (`true` for most rules) Example: `dotnet_code_quality.copy_analysis = true` @@ -571,7 +574,7 @@ Option Name: `sufficient_IterationCount_for_weak_KDF_algorithm` Option Values: integral values -Default Value: Specific to each configurable rule ('100000' by default for most rules) +Default Value: _Specific to each configurable rule_ (`100000` for most rules) Example: `dotnet_code_quality.CA5387.sufficient_IterationCount_for_weak_KDF_algorithm = 100000` @@ -628,21 +631,21 @@ Option Name: `additional_required_suffixes` Configurable Rules: [CA1710](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710) -Option Values: List (separated by '|') of type names with their required suffix (separated by '->'). +Option Values: List (separated by `|`) of type names with their required suffix (separated by `->`). Allowed type name formats: - 1. Type name only (includes all types with the name, regardless of the containing type or namespace) - 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional "T:" prefix. + 1. Type name only (includes all types with the name, regardless of the containing type or namespace). + 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional `T:` prefix. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.CA1710.additional_required_suffixes = MyClass->Class` | All types inheriting from 'MyClass' are expected to have the 'Class' suffix | -|`dotnet_code_quality.CA1710.additional_required_suffixes = MyClass->Class|MyNamespace.IPath->Path` | All types inheriting from 'MyClass' are expected to have the 'Class' suffix AND all types implementing 'MyNamespace.IPath' are expected to have the 'Path' suffix. | -|`dotnet_code_quality.CA1710.additional_required_suffixes = T:System.Data.IDataReader->{}` | Allows to override built-in suffixes, in this case, all types implementing 'IDataReader' are no longer expected to end in 'Collection' | +| `dotnet_code_quality.CA1710.additional_required_suffixes = MyClass->Class` | All types inheriting from `MyClass` are expected to have the `Class` suffix. | +| `dotnet_code_quality.CA1710.additional_required_suffixes = MyClass->Class\|MyNamespace.IPath->Path` | All types inheriting from `MyClass` are expected to have the `Class` suffix AND all types implementing `MyNamespace.IPath` are expected to have the `Path` suffix. | +| `dotnet_code_quality.CA1710.additional_required_suffixes = T:System.Data.IDataReader->{}` | Allows to override built-in suffixes, in this case, all types implementing `IDataReader` are no longer expected to end in `Collection`. | ### Additional required generic interfaces @@ -650,20 +653,20 @@ Option Name: `additional_required_generic_interfaces` Configurable Rules: [CA1010](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1010) -Option Values: List (separated by '|') of interface names with their required generic fully qualified interface (separated by '->'). +Option Values: List (separated by `|`) of interface names with their required generic fully qualified interface (separated by `->`). Allowed interface formats: - 1. Interface name only (includes all interfaces with the name, regardless of the containing type or namespace) - 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional "T:" prefix. + 1. Interface name only (includes all interfaces with the name, regardless of the containing type or namespace). + 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional `T:` prefix. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.CA1010.additional_required_generic_interfaces = ISomething->System.Collections.Generic.IEnumerable`\``1` | All types implementing 'ISomething' regardless of its namespace are expected to also implement 'System.Collections.Generic.IEnumerable`1'. | -|`dotnet_code_quality.CA1010.additional_required_generic_interfaces = T:System.Collections.IDictionary->T:System.Collections.Generic.IDictionary`\``2` | All types implementing 'System.Collections.Generic.IDictionary' are expected to also implement 'System.Collections.Generic.IDictionary`2'. | +| ``dotnet_code_quality.CA1010.additional_required_generic_interfaces = ISomething->System.Collections.Generic.IEnumerable`1`` | All types implementing `ISomething` regardless of its namespace are expected to also implement ``System.Collections.Generic.IEnumerable\`1``. | +| ``dotnet_code_quality.CA1010.additional_required_generic_interfaces = T:System.Collections.IDictionary->T:System.Collections.Generic.IDictionary`2`` | All types implementing `System.Collections.IDictionary` are expected to also implement ``System.Collections.Generic.IDictionary`2``. | ### Inheritance excluded type or namespace names @@ -671,13 +674,13 @@ Option Name: `additional_inheritance_excluded_symbol_names` Configurable Rules: [CA1501](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1501) -Option Values: Names of types or namespaces (separated by '|'), such that the type or type's namespace doesn't count in the inheritance hierarchy tree. +Option Values: Names of types or namespaces (separated by `|`), such that the type or type's namespace does not count in the inheritance hierarchy tree. Allowed symbol name formats: - 1. Type or namespace name (includes all types with the name, regardless of the containing type or namespace and all types whose namespace contains the name) - 2. Type or namespace name ending with a wildcard symbol (includes all types whose name starts with the given name, regardless of the containing type or namespace and all types whose namespace contains the name) - 3. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional "T:" prefix for types or "N:" prefix for namespaces. - 4. Fully qualified type or namespace name with an optional "T:" prefix for type or "N:" prefix for namespace and ending with the wildcard symbol (includes all types whose fully qualified name starts with the given suffix) + 1. Type or namespace name (includes all types with the name, regardless of the containing type or namespace and all types whose namespace contains the name). + 2. Type or namespace name ending with a wildcard symbol (includes all types whose name starts with the given name, regardless of the containing type or namespace and all types whose namespace contains the name). + 3. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) with an optional `T:` prefix for types or `N:` prefix for namespaces. + 4. Fully qualified type or namespace name with an optional `T:` prefix for type or `N:` prefix for namespace and ending with the wildcard symbol (includes all types whose fully qualified name starts with the given suffix). Default Value: `N:System.*` (note that this value is always automatically added to the value provided) @@ -685,14 +688,14 @@ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = MyType` | Matches all types named 'MyType' or whose containing namespace contains 'MyType' and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = MyType1\|MyType2` | Matches all types named either 'MyType1' or 'MyType2' or whose containing namespace contains either 'MyType1' or 'MyType2' and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS.MyType` | Matches specific type 'MyType' in the namespace 'NS' and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS1.MyType1\|T:NS2.MyType2` | Matches specific types 'MyType1' and 'MyType2' with respective fully qualified names and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = N:NS` | Matches all types from the 'NS' namespace and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = My*` | Matches all types whose name starts with 'My' or whose containing namespace parts starts with 'My' and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS.My*` | Matches all types whose name starts with 'My' in the namespace 'NS' and all types from the 'System' namespace | -|`dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = N:My*` | Matches all types whose containing namespace starts with 'My' and all types from the 'System' namespace | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = MyType` | Matches all types named `MyType` or whose containing namespace contains `MyType` and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = MyType1\|MyType2` | Matches all types named either `MyType1` or `MyType2` or whose containing namespace contains either `MyType1` or `MyType2` and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS.MyType` | Matches specific type `MyType` in the namespace `NS` and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS1.MyType1\|T:NS2.MyType2` | Matches specific types `MyType1` and `MyType2` with respective fully qualified names and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = N:NS` | Matches all types from the `NS` namespace and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = My*` | Matches all types whose name starts with `My` or whose containing namespace parts starts with `My` and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = T:NS.My*` | Matches all types whose name starts with `My` in the namespace `NS` and all types from the `System` namespace. | +| `dotnet_code_quality.CA1501.additional_inheritance_excluded_symbol_names = N:My*` | Matches all types whose containing namespace starts with `My` and all types from the `System` namespace. | ### Analyzed symbol kinds @@ -702,7 +705,7 @@ Configurable Rules: [CA1716](https://docs.microsoft.com/dotnet/fundamentals/code Option Values: One or more fields of enum [Microsoft.CodeAnalysis.SymbolKind](https://roslynsourceindex.azurewebsites.net/#Microsoft.CodeAnalysis/Symbols/SymbolKind.cs,30fd9c0834bef6ff) as a comma separated list. -Default Value: Namespace, NamedType, Method, Property, Event, Parameter +Default Value: `Namespace, NamedType, Method, Property, Event, Parameter` Example: `dotnet_code_quality.CA1716.analyzed_symbol_kinds = Namespace, Property` @@ -712,7 +715,7 @@ Option Name: `use_naming_heuristic` Configurable Rules: [CA1303](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `false` @@ -724,23 +727,23 @@ Option Name: `additional_use_results_methods` Configurable Rules: [CA1806](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806) -Option Values: Names of additional methods (separated by '|') for CA1806. +Option Values: Names of additional methods (separated by `|`). Allowed method name formats: - 1. Method name only (includes all methods with the name, regardless of the containing type or namespace) + 1. Method name only (includes all methods with the name, regardless of the containing type or namespace). 2. Fully qualified names in the [symbol's documentation ID format](https://github.com/dotnet/csharplang/blob/master/spec/documentation-comments.md#id-string-format) - with an optional "M:" prefix. + with an optional `M:` prefix. -Default Value: None +Default Value: _None_ Examples: | Option Value | Summary | | --- | --- | -|`dotnet_code_quality.CA1806.additional_use_results_methods = MyMethod` | Matches all methods named 'MyMethod' in the compilation -|`dotnet_code_quality.CA1806.additional_use_results_methods = MyMethod1\|MyMethod2` | Matches all methods named either 'MyMethod1' or 'MyMethod2' in the compilation -|`dotnet_code_quality.CA1806.additional_use_results_methods = M:NS.MyType.MyMethod(ParamType)` | Matches specific method 'MyMethod' with given fully qualified signature -|`dotnet_code_quality.CA1806.additional_use_results_methods = M:NS1.MyType1.MyMethod1(ParamType)\|M:NS2.MyType2.MyMethod2(ParamType)` | Matches specific methods 'MyMethod1' and 'MyMethod2' with respective fully qualified signature +| `dotnet_code_quality.CA1806.additional_use_results_methods = MyMethod` | Matches all methods named `MyMethod` in the compilation. | +| `dotnet_code_quality.CA1806.additional_use_results_methods = MyMethod1\|MyMethod2` | Matches all methods named either `MyMethod1` or `MyMethod2` in the compilation. | +| `dotnet_code_quality.CA1806.additional_use_results_methods = M:NS.MyType.MyMethod(ParamType)` | Matches specific method `MyMethod` with given fully qualified signature. | +| `dotnet_code_quality.CA1806.additional_use_results_methods = M:NS1.MyType1.MyMethod1(ParamType)\|M:NS2.MyType2.MyMethod2(ParamType)` | Matches specific methods `MyMethod1` and `MyMethod2` with respective fully qualified signature. | ### Allowed suffixes @@ -748,7 +751,7 @@ Option Name: `allowed_suffixes` Configurable Rules: [CA1711](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711) -Option Values: List (separated by '|') of allowed suffixes +Option Values: List (separated by `|`) of allowed suffixes Example: `dotnet_code_quality.CA1711.allowed_suffixes = Flag|Flags` @@ -758,7 +761,7 @@ Option Name: `enable_platform_analyzer_on_pre_net5_target` Configurable Rules: [CA14016](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `false` @@ -770,7 +773,7 @@ Option Name: `exclude_structs` Configurable Rules: [CA1051](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `false` @@ -782,7 +785,7 @@ Option Name: `exclude_ordefault_methods` Configurable Rules: [CA1826](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1826) -Option Values: Boolean values +Option Values: `true` or `false` Default Value: `false` diff --git a/eng/GenerateAnalyzerNuspec.targets b/eng/GenerateAnalyzerNuspec.targets index b7210a7701..c9d292b5af 100644 --- a/eng/GenerateAnalyzerNuspec.targets +++ b/eng/GenerateAnalyzerNuspec.targets @@ -98,15 +98,9 @@ + Command='"$(DotNetExecutable)" "$(_GenerateDocumentationAndConfigFilesPath)" "-validateOnly:true" "$(_GeneratedRulesetsDir)" "$(_GeneratedEditorconfigsDir)" "$(_GeneratedGlobalAnalyzerConfigsDir)" "$(ArtifactsBinDir)$(EscapeDirectorySuffix)" "$(Configuration)" "%(AnalyzerRulesetAssembly.TargetFramework)" "@(AnalyzerRulesetAssembly)" "$(PackagePropsFileDir)" "$(PackagePropsFileName)" "$(PackageTargetsFileDir)" "$(PackageTargetsFileName)" "$(DisableNETAnalyzersPackagePropsFileName)" "$(AnalyzerSarifFileDir)" "$(AnalyzerDocumentationFileName)" "$(AnalyzerSarifFileDir)" "$(AnalyzerSarifFileName)" "$(VersionPrefix)" $(NuspecPackageId) $(ContainsPortedFxCopRules) $(GenerateAnalyzerRulesMissingDocumentationFile) "$(ReleaseTrackingOptOut)"' /> - - - - - - - + @@ -152,6 +146,6 @@ <_NuspecMetadata Include="repositoryUrl=$(PrivateRepositoryUrl)" /> - + diff --git a/eng/Versions.props b/eng/Versions.props index f4cb6086eb..a6b8ec38a0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,11 +23,12 @@ 4.3.6 true - 3.8.0-3.20428.4 + 3.8.0 + 3.8.0 3.3.1 3.7.0 - 3.8.0-4.final + 3.8.0 3.3.1 5.0.1 $(DogfoodAnalyzersVersion) diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/AllRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/AllRules.ruleset deleted file mode 100644 index 8663bb0119..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/AllRules.ruleset +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicCorrectnessRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicCorrectnessRules.ruleset deleted file mode 100644 index a981d46b15..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicCorrectnessRules.ruleset +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicDesignGuidelineRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicDesignGuidelineRules.ruleset deleted file mode 100644 index 9344ea3321..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/BasicDesignGuidelineRules.ruleset +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedCorrectnessRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedCorrectnessRules.ruleset deleted file mode 100644 index 1419564c11..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedCorrectnessRules.ruleset +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedDesignGuidelineRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedDesignGuidelineRules.ruleset deleted file mode 100644 index ff787a207d..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ExtendedDesignGuidelineRules.ruleset +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/GlobalizationRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/GlobalizationRules.ruleset deleted file mode 100644 index 4103098c24..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/GlobalizationRules.ruleset +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ManagedMinimumRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ManagedMinimumRules.ruleset deleted file mode 100644 index 04e84725be..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/ManagedMinimumRules.ruleset +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/MinimumRecommendedRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/MinimumRecommendedRules.ruleset deleted file mode 100644 index 6b0de9665f..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/MinimumRecommendedRules.ruleset +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/SecurityRules.ruleset b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/SecurityRules.ruleset deleted file mode 100644 index 6f12ca29f1..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/LegacyRulesets/SecurityRules.ruleset +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.Package.csproj b/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.Package.csproj deleted file mode 100644 index 11af73938d..0000000000 --- a/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.Package.csproj +++ /dev/null @@ -1,55 +0,0 @@ - - - - netstandard2.0 - - true - false - Microsoft.CodeAnalysis.FxCopAnalyzers - Microsoft recommended code quality rules and .NET API usage rules, including the most important "FxCop" rules, implemented as analyzers using the .NET Compiler Platform ("Roslyn"). These analyzers check your code for security, performance, and design issues, among others. The documentation for FxCop analyzers can be found at https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers - Microsoft FxCop Analyzers - Microsoft FxCop rules implemented as analyzers using the .NET Compiler Platform ("Roslyn"). - Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.Package.csproj b/nuget/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.Package.csproj deleted file mode 100644 index c06d12928e..0000000000 --- a/nuget/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.Package.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - netstandard2.0 - - true - false - Microsoft.CodeAnalysis.VersionCheckAnalyzer - Microsoft.CodeAnalysis Version Check Analyzer - Microsoft.CodeAnalysis Version Check Analyzer - Version Check Analyzer - Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics VersionCheckAnalyzer - true - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.Package.csproj b/nuget/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.Package.csproj deleted file mode 100644 index 65728e66a8..0000000000 --- a/nuget/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.Package.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - netstandard2.0 - - true - false - Microsoft.CodeQuality.Analyzers - Microsoft recommended code quality rules implemented as analyzers using the .NET Compiler Platform ("Roslyn"). This package is included as a part of "Microsoft.CodeAnalysis.FxCopAnalyzers" NuGet package and does not need to be installed separately. - Microsoft.CodeQuality Analyzers - Diagnostic analyzers for the Microsoft .NET Compiler Platform (Roslyn) - Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics - true - true - - - - - - - - - - - - - - - diff --git a/nuget/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.Package.csproj b/nuget/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.Package.csproj deleted file mode 100644 index e209d9faa0..0000000000 --- a/nuget/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.Package.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - netstandard2.0 - - true - false - Microsoft.NetCore.Analyzers - Microsoft recommended .NetCore API usage rules implemented as analyzers using the .NET Compiler Platform ("Roslyn"). This package is included as a part of "Microsoft.CodeAnalysis.FxCopAnalyzers" NuGet package and does not need to be installed separately. - Microsoft .NetCore API Analyzers - Microsoft .NetCore API Analyzers - Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics - true - true - - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.Package.csproj b/nuget/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.Package.csproj deleted file mode 100644 index 4848102e73..0000000000 --- a/nuget/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.Package.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - netstandard2.0 - - true - false - Microsoft.NetFramework.Analyzers - Microsoft recommended API usage rules for APIs specific to the full .NetFramework which are not present in .NetCore, implemented as analyzers using the .NET Compiler Platform ("Roslyn"). This package is included as a part of "Microsoft.CodeAnalysis.FxCopAnalyzers" NuGet package and does not need to be installed separately. - Microsoft.NetFramework.Analyzers - Microsoft.NetFramework.Analyzers - Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics - true - true - - - - - - - - - - - - - \ No newline at end of file diff --git a/nuget/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.Package.csproj b/nuget/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.Package.csproj index 313bf92fc2..5da57b643a 100644 --- a/nuget/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.Package.csproj +++ b/nuget/NetAnalyzers/Microsoft.CodeAnalysis.NetAnalyzers.Package.csproj @@ -24,7 +24,7 @@ - + diff --git a/nuget/Text.Analyzers/Text.Analyzers.Package.csproj b/nuget/Text.Analyzers/Text.Analyzers.Package.csproj index c9aec72de9..66f9de05d8 100644 --- a/nuget/Text.Analyzers/Text.Analyzers.Package.csproj +++ b/nuget/Text.Analyzers/Text.Analyzers.Package.csproj @@ -10,14 +10,14 @@ Text Analyzers Roslyn CodeAnalysis Compiler CSharp VB VisualBasic Diagnostic Analyzers Syntax Semantics - - false + true + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 51193fd584..b876ef5c2a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,7 +6,6 @@ $(Features);flow-analysis - $(DefineConstants),BUILDING_VSIX $(DefineConstants),LEGACY_CODE_METRICS_MODE diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/DeprecationAnalyzer.cs b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/DeprecationAnalyzer.cs deleted file mode 100644 index 035a23a399..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/DeprecationAnalyzer.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections.Immutable; -using Analyzer.Utilities; -using Analyzer.Utilities.Extensions; -using Microsoft.CodeAnalysis.Diagnostics; - -#if CODE_QUALITY_ANALYZERS -using AnalyzerResources = Microsoft.CodeQuality.Analyzers.MicrosoftCodeQualityAnalyzersResources; -#elif NET_CORE_ANALYZERS -using AnalyzerResources = Microsoft.NetCore.Analyzers.MicrosoftNetCoreAnalyzersResources; -#elif NET_FRAMEWORK_ANALYZERS -using AnalyzerResources = Microsoft.NetFramework.Analyzers.MicrosoftNetFrameworkAnalyzersResources; -#endif - -namespace Microsoft.CodeAnalysis.FxCopAnalyzers -{ - [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] - public sealed class DeprecationAnalyzer : DiagnosticAnalyzer - { - private const string RuleId = "CA9998"; - - private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(AnalyzerResources.AnalyzerPackageDeprecationTitle), AnalyzerResources.ResourceManager, typeof(AnalyzerResources)); - private static readonly LocalizableString s_localizableMessageFormat = new LocalizableResourceString(nameof(AnalyzerResources.AnalyzerPackageDeprecationMessage), AnalyzerResources.ResourceManager, typeof(AnalyzerResources)); - -#pragma warning disable RS0030 // Do not used banned APIs - This is a special analyzer for package deprecation. - public static readonly DiagnosticDescriptor Rule = new( - RuleId, - s_localizableTitle, - s_localizableMessageFormat, - DiagnosticCategory.Reliability, - DiagnosticSeverity.Warning, - isEnabledByDefault: true, - helpLinkUri: "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - description: null); -#pragma warning restore RS0030 // Do not used banned APIs - - public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); - - public override void Initialize(AnalysisContext context) - { - context.EnableConcurrentExecution(); - context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); - - context.RegisterCompilationAction(context => context.ReportNoLocationDiagnostic(Rule)); - } - } -} diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md deleted file mode 100644 index ae4484b509..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md +++ /dev/null @@ -1,2989 +0,0 @@ -# Microsoft.CodeAnalysis.FxCopAnalyzers - -## [CA1000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000): Do not declare static members on generic types - -When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001): Types that own disposable fields should be disposable - -A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002): Do not expose generic lists - -System.Collections.Generic.List\ is a generic collection that's designed for performance and not inheritance. List\ does not contain virtual members that make it easier to change the behavior of an inherited class. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1003](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1003): Use generic event handler instances - -A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1005](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1005): Avoid excessive parameters on generic types - -The more type parameters a generic type contains, the more difficult it is to know and remember what each type parameter represents. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1008): Enums should have zero value - -The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be ""None"" to indicate that no values have been set in the enumeration. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1010](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1010): Generic interface should also be implemented - -To broaden the usability of a type, implement one of the generic interfaces. This is especially true for collections as they can then be used to populate generic collection types. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012): Abstract types should not have public constructors - -Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1014](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1014): Mark assemblies with CLSCompliant - -The Common Language Specification (CLS) defines naming restrictions, data types, and rules to which assemblies must conform if they will be used across programming languages. Good design dictates that all assemblies explicitly indicate CLS compliance by using CLSCompliantAttribute . If this attribute is not present on an assembly, the assembly is not compliant. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1016](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016): Mark assemblies with assembly version - -The .NET Framework uses the version number to uniquely identify an assembly, and to bind to types in strongly named assemblies. The version number is used together with version and publisher policy. By default, applications run only with the assembly version with which they were built. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1017](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1017): Mark assemblies with ComVisible - -ComVisibleAttribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for the whole assembly and then overridden for individual types and type members. If this attribute is not present, the contents of the assembly are visible to COM clients. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1018](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1018): Mark attributes with AttributeUsageAttribute - -Specify AttributeUsage on {0} - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1019](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019): Define accessors for attribute arguments - -Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1} - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1021](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1021): Avoid out parameters - -Passing types by reference (using 'out' or 'ref') requires experience with pointers, understanding how value types and reference types differ, and handling methods with multiple return values. Also, the difference between 'out' and 'ref' parameters is not widely understood. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1024](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1024): Use properties where appropriate - -A public or protected method has a name that starts with ""Get"", takes no parameters, and returns a value that is not an array. The method might be a good candidate to become a property. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1027](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1027): Mark enums with FlagsAttribute - -An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1028](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1028): Enum Storage should be Int32 - -An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1030](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1030): Use events where appropriate - -This rule detects methods that have names that ordinarily would be used for events. If a method is called in response to a clearly defined state change, the method should be invoked by an event handler. Objects that call the method should raise events instead of calling the method directly. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1031](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031): Do not catch general exception types - -A general exception such as System.Exception or System.SystemException or a disallowed exception type is caught in a catch statement, or a general catch clause is used. General and disallowed exceptions should not be caught. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1032](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032): Implement standard exception constructors - -Failure to provide the full set of constructors can make it difficult to correctly handle exceptions. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1033](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033): Interface methods should be callable by child types - -An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1034](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1034): Nested types should not be visible - -A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1036](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1036): Override methods on comparable types - -A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1040](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040): Avoid empty interfaces - -Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members; therefore, it does not define a contract that can be implemented. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1041](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041): Provide ObsoleteAttribute message - -A type or member is marked by using a System.ObsoleteAttribute attribute that does not have its ObsoleteAttribute.Message property specified. When a type or member that is marked by using ObsoleteAttribute is compiled, the Message property of the attribute is displayed. This gives the user information about the obsolete type or member. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1043](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1043): Use Integral Or String Argument For Indexers - -Indexers, that is, indexed properties, should use integer or string types for the index. These types are typically used for indexing data structures and increase the usability of the library. Use of the Object type should be restricted to those cases where the specific integer or string type cannot be specified at design time. If the design requires other types for the index, reconsider whether the type represents a logical data store. If it does not represent a logical data store, use a method. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1044](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1044): Properties should not be write only - -Although it is acceptable and often necessary to have a read-only property, the design guidelines prohibit the use of write-only properties. This is because letting a user set a value, and then preventing the user from viewing that value, does not provide any security. Also, without read access, the state of shared objects cannot be viewed, which limits their usefulness. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1045](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1045): Do not pass types by reference - -Passing types by reference (using out or ref) requires experience with pointers, understanding how value types and reference types differ, and handling methods that have multiple return values. Also, the difference between out and ref parameters is not widely understood. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1046](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1046): Do not overload equality operator on reference types - -For reference types, the default implementation of the equality operator is almost always correct. By default, two references are equal only if they point to the same object. If the operator is providing meaningful value equality, the type should implement the generic 'System.IEquatable' interface. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1047](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1047): Do not declare protected member in sealed type - -Types declare protected members so that inheriting types can access or override the member. By definition, you cannot inherit from a sealed type, which means that protected methods on sealed types cannot be called. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1050](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1050): Declare types in namespaces - -Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1051](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051): Do not declare visible instance fields - -The primary use of a field should be as an implementation detail. Fields should be private or internal and should be exposed by using properties. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1052](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052): Static holder types should be Static or NotInheritable - -Type '{0}' is a static holder type but is neither static nor NotInheritable - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1054](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054): URI-like parameters should not be strings - -This rule assumes that the parameter represents a Uniform Resource Identifier (URI). A string representation or a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. 'System.Uri' class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1055](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1055): URI-like return values should not be strings - -This rule assumes that the method returns a URI. A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1056](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1056): URI-like properties should not be strings - -This rule assumes that the property represents a Uniform Resource Identifier (URI). A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1058](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1058): Types should not extend certain base types - -An externally visible type extends certain base types. Use one of the alternatives. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1060](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1060): Move pinvokes to native methods class - -Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1061](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1061): Do not hide base class methods - -A method in a base type is hidden by an identically named method in a derived type when the parameter signature of the derived method differs only by types that are more weakly derived than the corresponding types in the parameter signature of the base method. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1062](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062): Validate arguments of public methods - -An externally visible method dereferences one of its reference arguments without verifying whether that argument is null (Nothing in Visual Basic). All reference arguments that are passed to externally visible methods should be checked against null. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. If the method is designed to be called only by known assemblies, you should make the method internal. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1063](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1063): Implement IDisposable Correctly - -All IDisposable types should implement the Dispose pattern correctly. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1064](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1064): Exceptions should be public - -An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1065](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065): Do not raise exceptions in unexpected locations - -A method that is not expected to throw exceptions throws an exception. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1066](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1066): Implement IEquatable when overriding Object.Equals - -When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable\, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable\.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1067](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067): Override Object.Equals(object) when implementing IEquatable\ - -When a type T implements the interface IEquatable\, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the "principle of least surprise". - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1068](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068): CancellationToken parameters must come last - -Method '{0}' should take CancellationToken as the last parameter - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1069](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1069): Enums values should not be duplicated - -The field reference '{0}' is duplicated in this bitwise initialization - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1070](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1070): Do not declare event fields as virtual - -Do not declare virtual events in a base class. Overridden events in a derived class have undefined behavior. The C# compiler does not handle this correctly and it is unpredictable whether a subscriber to the derived event will actually be subscribing to the base class event. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1200](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200): Avoid using cref tags with a prefix - -Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax. - -|Item|Value| -|-|-| -|Category|Documentation| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1303](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303): Do not pass literals as localized parameters - -A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1304](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304): Specify CultureInfo - -A method or constructor calls a member that has an overload that accepts a System.Globalization.CultureInfo parameter, and the method or constructor does not call the overload that takes the CultureInfo parameter. When a CultureInfo or System.IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1305](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305): Specify IFormatProvider - -A method or constructor calls one or more members that have overloads that accept a System.IFormatProvider parameter, and the method or constructor does not call the overload that takes the IFormatProvider parameter. When a System.Globalization.CultureInfo or IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be based on the input from/output displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider'. Otherwise, if the result will be stored and accessed by software, such as when it is loaded from disk/database and when it is persisted to disk/database, specify 'CultureInfo.InvariantCulture'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1307](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307): Specify StringComparison for clarity - -A string comparison operation uses a method overload that does not set a StringComparison parameter. It is recommended to use the overload with StringComparison parameter for clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1308](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308): Normalize strings to uppercase - -Strings should be normalized to uppercase. A small group of characters cannot make a round trip when they are converted to lowercase. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1309](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309): Use ordinal string comparison - -A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1310](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310): Specify StringComparison for correctness - -A string comparison operation uses a method overload that does not set a StringComparison parameter, hence its behavior could vary based on the current user's locale settings. It is strongly recommended to use the overload with StringComparison parameter for correctness and clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1401](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1401): P/Invokes should not be visible - -A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1416](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416): Validate platform compatibility - -Using platform dependent API on a component makes the code no longer work across all platforms. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1417](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1417): Do not use 'OutAttribute' on string parameters for P/Invokes - -String parameters passed by value with the 'OutAttribute' can destabilize the runtime if the string is an interned string. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1501](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1501): Avoid excessive inheritance - -Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1502](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1502): Avoid excessive complexity - -Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1505](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505): Avoid unmaintainable code - -The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1506](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1506): Avoid excessive class coupling - -This rule measures class coupling by counting the number of unique type references that a symbol contains. Symbols that have a high degree of class coupling can be difficult to maintain. It is a good practice to have types and methods that exhibit low coupling and high cohesion. To fix this violation, try to redesign the code to reduce the number of types to which it is coupled. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1507](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507): Use nameof to express symbol names - -Using nameof helps keep your code valid when refactoring. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1508](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508): Avoid dead conditional code - -'{0}' is never '{1}'. Remove or refactor the condition(s) to avoid dead code. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1509](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1509): Invalid entry in code metrics rule specification file - -Invalid entry in code metrics rule specification file. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1700](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700): Do not name enum values 'Reserved' - -This rule assumes that an enumeration member that has a name that contains "reserved" is not currently used but is a placeholder to be renamed or removed in a future version. Renaming or removing a member is a breaking change. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1707](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707): Identifiers should not contain underscores - -By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1708](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1708): Identifiers should differ by more than case - -Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1710](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710): Identifiers should have correct suffix - -By convention, the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, have a suffix that is associated with the base type or interface. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1711](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711): Identifiers should not have incorrect suffix - -By convention, only the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, should end with specific reserved suffixes. Other type names should not use these reserved suffixes. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1712](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712): Do not prefix enum values with type name - -An enumeration's values should not start with the type name of the enumeration. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1713](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1713): Events should not have 'Before' or 'After' prefix - -Event names should describe the action that raises the event. To name related events that are raised in a specific sequence, use the present or past tense to indicate the relative position in the sequence of actions. For example, when naming a pair of events that is raised when closing a resource, you might name it 'Closing' and 'Closed', instead of 'BeforeClose' and 'AfterClose'. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1714](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714): Flags enums should have plural names - -A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1715](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715): Identifiers should have correct prefix - -The name of an externally visible interface does not start with an uppercase ""I"". The name of a generic type parameter on an externally visible type or method does not start with an uppercase ""T"". - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1716](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716): Identifiers should not match keywords - -A namespace name or a type name matches a reserved keyword in a programming language. Identifiers for namespaces and types should not match keywords that are defined by languages that target the common language runtime. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1717](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717): Only FlagsAttribute enums should have plural names - -Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1720](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720): Identifier contains type name - -Names of parameters and members are better used to communicate their meaning than to describe their type, which is expected to be provided by development tools. For names of members, if a data type name must be used, use a language-independent name instead of a language-specific one. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1721](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1721): Property names should not match get methods - -The name of a public or protected member starts with ""Get"" and otherwise matches the name of a public or protected property. ""Get"" methods and properties should have names that clearly distinguish their function. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1724](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724): Type names should not match namespaces - -Type names should not match the names of namespaces that are defined in the .NET Framework class library. Violating this rule can reduce the usability of the library. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1725](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725): Parameter names should match base declaration - -Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1802](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1802): Use literals where appropriate - -A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at run?time. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1805](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1805): Do not initialize unnecessarily - -The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed. In some cases, such as with static readonly fields that permanently retain their default value, consider instead changing them to be constants or properties. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1806](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806): Do not ignore method results - -A new object is created but never used; or a method that creates and returns a new string is called and the new string is never used; or a COM or P/Invoke method returns an HRESULT or error code that is never used. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1810](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810): Initialize reference type static fields inline - -A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1812](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812): Avoid uninstantiated internal classes - -An instance of an assembly-level type is not created by code in the assembly. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1813](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1813): Avoid unsealed attributes - -The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1814](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1814): Prefer jagged arrays over multidimensional - -A jagged array is an array whose elements are arrays. The arrays that make up the elements can be of different sizes, leading to less wasted space for some sets of data. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1815](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1815): Override equals and operator equals on value types - -For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1816](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1816): Dispose methods should call SuppressFinalize - -A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic). - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1819](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1819): Properties should not return arrays - -Arrays that are returned by properties are not write-protected, even when the property is read-only. To keep the array tamper-proof, the property must return a copy of the array. Typically, users will not understand the adverse performance implications of calling such a property. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1820](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820): Test for empty strings using string length - -Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1821](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1821): Remove empty Finalizers - -Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1822](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822): Mark members as static - -Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1823](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823): Avoid unused private fields - -Private fields were detected that do not appear to be accessed in the assembly. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1824](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824): Mark assemblies with NeutralResourcesLanguageAttribute - -The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1825](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825): Avoid zero-length array allocations - -Avoid unnecessary zero-length array allocations. Use {0} instead. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1826](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1826): Do not use Enumerable methods on indexable collections - -This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1827](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1827): Do not use Count() or LongCount() when Any() can be used - -For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1828](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1828): Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used - -For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1829](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829): Use Length/Count property instead of Count() when available - -Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1830](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830): Prefer strongly-typed Append and Insert method overloads on StringBuilder - -StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1831](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1831): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on string values produces a copy of requested portion of the string. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1832](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1832): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on array values produces a copy of requested portion of the array. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1833](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1833): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on array values produces a copy of requested portion of the array. This copy is often unwanted when it is implicitly used as a Span or Memory value. Use the AsSpan method to avoid the copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1834](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1834): Consider using 'StringBuilder.Append(char)' when applicable - -'StringBuilder.Append(char)' is more efficient than 'StringBuilder.Append(string)' when the string is a single character. When calling 'Append' with a constant, prefer using a constant char rather than a constant string containing one character. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1835](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1835): Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' - -'Stream' has a 'ReadAsync' overload that takes a 'Memory\' as the first argument, and a 'WriteAsync' overload that takes a 'ReadOnlyMemory\' as the first argument. Prefer calling the memory based overloads, which are more efficient. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1836](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1836): Prefer IsEmpty over Count - -For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1837](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1837): Use 'Environment.ProcessId' - -'Environment.ProcessId' is simpler and faster than 'Process.GetCurrentProcess().Id'. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1838](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1838): Avoid 'StringBuilder' parameters for P/Invokes - -Marshalling of 'StringBuilder' always creates a native buffer copy, resulting in multiple allocations for one marshalling operation. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2000): Dispose objects before losing scope - -If a disposable object is not explicitly disposed before all references to it are out of scope, the object will be disposed at some indeterminate time when the garbage collector runs the finalizer of the object. Because an exceptional event might occur that will prevent the finalizer of the object from running, the object should be explicitly disposed instead. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2002): Do not lock on objects with weak identity - -An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2007](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007): Consider calling ConfigureAwait on the awaited task - -When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2008): Do not create tasks without passing a TaskScheduler - -Do not create tasks unless you are using one of the overloads that takes a TaskScheduler. The default is to schedule on TaskScheduler.Current, which would lead to deadlocks. Either use TaskScheduler.Default to schedule on the thread pool, or explicitly pass TaskScheduler.Current to make your intentions clear. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2009](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2009): Do not call ToImmutableCollection on an ImmutableCollection value - -Do not call {0} on an {1} value - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2011](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2011): Avoid infinite recursion - -Do not assign the property within its setter. This call might result in an infinite recursion. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2012): Use ValueTasks correctly - -ValueTasks returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2013](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013): Do not use ReferenceEquals with value types - -Value type typed arguments are uniquely boxed for each call to this method, therefore the result is always false. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2014](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2014): Do not use stackalloc in loops - -Stack space allocated by a stackalloc is only released at the end of the current method's invocation. Using it in a loop can result in unbounded stack growth and eventual stack overflow conditions. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2015](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2015): Do not define finalizers for types derived from MemoryManager\ - -Adding a finalizer to a type derived from MemoryManager\ may permit memory to be freed while it is still in use by a Span\. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2016](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016): Forward the 'CancellationToken' parameter to methods that take one - -Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2100](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2100): Review SQL queries for security vulnerabilities - -SQL queries that directly use user input can be vulnerable to SQL injection attacks. Review this SQL query for potential vulnerabilities, and consider using a parameterized SQL query. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2101](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2101): Specify marshaling for P/Invoke string arguments - -A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2109](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2109): Review visible event handlers - -A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2119](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2119): Seal methods that satisfy private interfaces - -An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2153](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2153): Do Not Catch Corrupted State Exceptions - -Catching corrupted state exceptions could mask errors (such as access violations), resulting in inconsistent state of execution or making it easier for attackers to compromise system. Instead, catch and handle a more specific set of exception type(s) or re-throw the exception. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2200](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2200): Rethrow to preserve stack details - -Re-throwing caught exception changes stack information - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2201](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2201): Do not raise reserved exception types - -An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2207](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2207): Initialize value type static fields inline - -A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2208](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2208): Instantiate argument exceptions correctly - -A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2211](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2211): Non-constant fields should not be visible - -Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2213](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2213): Disposable fields should be disposed - -A type that implements System.IDisposable declares fields that are of types that also implement IDisposable. The Dispose method of the field is not called by the Dispose method of the declaring type. To fix a violation of this rule, call Dispose on fields that are of types that implement IDisposable if you are responsible for allocating and releasing the unmanaged resources held by the field. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2214](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214): Do not call overridable methods in constructors - -Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called). - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2215](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2215): Dispose methods should call base class dispose - -A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2216](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2216): Disposable types should declare finalizer - -A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2217](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2217): Do not mark enums with FlagsAttribute - -An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2218](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2218): Override GetHashCode on overriding Equals - -GetHashCode returns a value, based on the current instance, that is suited for hashing algorithms and data structures such as a hash table. Two objects that are the same type and are equal must return the same hash code. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2219](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2219): Do not raise exceptions in finally clauses - -When an exception is raised in a finally clause, the new exception hides the active exception. This makes the original error difficult to detect and debug. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2224](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2224): Override Equals on overloading operator equals - -A public type implements the equality operator but does not override Object.Equals. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2225](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2225): Operator overloads have named alternates - -An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2226](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2226): Operators should have symmetrical overloads - -A type implements the equality or inequality operator and does not implement the opposite operator. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2227](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227): Collection properties should be read only - -A writable collection property allows a user to replace the collection with a different collection. A read-only property stops the collection from being replaced but still allows the individual members to be set. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2229](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2229): Implement serialization constructors - -To fix a violation of this rule, implement the serialization constructor. For a sealed class, make the constructor private; otherwise, make it protected. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2231](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2231): Overload operator equals on overriding value type Equals - -In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2234](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234): Pass system uri objects instead of strings - -A call is made to a method that has a string parameter whose name contains "uri", "URI", "urn", "URN", "url", or "URL". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2235](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2235): Mark all non-serializable fields - -An instance field of a type that is not serializable is declared in a type that is serializable. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2237](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2237): Mark ISerializable types with serializable - -To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2241](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241): Provide correct arguments to formatting methods - -The format argument that is passed to System.String.Format does not contain a format item that corresponds to each object argument, or vice versa. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2242](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2242): Test for NaN correctly - -This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2243](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2243): Attribute string literals should parse correctly - -The string literal parameter of an attribute does not parse correctly for a URL, a GUID, or a version. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2244](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2244): Do not duplicate indexed element initializations - -Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2245](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2245): Do not assign a property to itself - -The property {0} should not be assigned to itself - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2246](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2246): Assigning symbol and its member in the same statement - -Assigning to a symbol and its member (field/property) in the same statement is not recommended. It is not clear if the member access was intended to use symbol's old value prior to the assignment or new value from the assignment in this statement. For clarity, consider splitting the assignments into separate statements. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2247](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2247): Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum - -TaskCompletionSource has constructors that take TaskCreationOptions that control the underlying Task, and constructors that take object state that's stored in the task. Accidentally passing a TaskContinuationOptions instead of a TaskCreationOptions will result in the call treating the options as state. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2248](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2248): Provide correct 'enum' argument to 'Enum.HasFlag' - -'Enum.HasFlag' method expects the 'enum' argument to be of the same 'enum' type as the instance on which the method is invoked and that this 'enum' is marked with 'System.FlagsAttribute'. If these are different 'enum' types, an unhandled exception will be thrown at runtime. If the 'enum' type is not marked with 'System.FlagsAttribute' the call will always return 'false' at runtime. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2249](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249): Consider using 'string.Contains' instead of 'string.IndexOf' - -Calls to 'string.IndexOf' where the result is used to check for the presence/absence of a substring can be replaced by 'string.Contains'. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2300](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2300): Do not use insecure deserializer BinaryFormatter - -The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect BinaryFormatter deserialization without a SerializationBinder set, then disable rule CA2300, and enable rules CA2301 and CA2302. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2301](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2301): Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2302](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2302): Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2305](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2305): Do not use insecure deserializer LosFormatter - -The method '{0}' is insecure when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2310](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2310): Do not use insecure deserializer NetDataContractSerializer - -The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect NetDataContractSerializer deserialization without a SerializationBinder set, then disable rule CA2310, and enable rules CA2311 and CA2312. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2311](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2311): Do not deserialize without first setting NetDataContractSerializer.Binder - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2312](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2312): Ensure NetDataContractSerializer.Binder is set before deserializing - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2315](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2315): Do not use insecure deserializer ObjectStateFormatter - -The method '{0}' is insecure when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2321](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2321): Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver - -The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Initialize JavaScriptSerializer without a JavaScriptTypeResolver specified, or initialize with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2322](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2322): Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing - -The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Ensure that the JavaScriptSerializer is initialized without a JavaScriptTypeResolver specified, or initialized with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2326](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2326): Do not use TypeNameHandling values other than None - -Deserializing JSON when using a TypeNameHandling value other than None can be insecure. If you need to instead detect Json.NET deserialization when a SerializationBinder isn't specified, then disable rule CA2326, and enable rules CA2327, CA2328, CA2329, and CA2330. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2327](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2327): Do not use insecure JsonSerializerSettings - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2328](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2328): Ensure that JsonSerializerSettings are secure - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, ensure TypeNameHandling.None is specified, or for values other than None, ensure a SerializationBinder is specified to restrict deserialized types. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2329](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2329): Do not deserialize with JsonSerializer using an insecure configuration - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2330](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2330): Ensure that JsonSerializer has a secure configuration when deserializing - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2350](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2350): Do not use DataTable.ReadXml() with untrusted data - -The method '{0}' is insecure when deserializing untrusted data - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2351](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2351): Do not use DataSet.ReadXml() with untrusted data - -The method '{0}' is insecure when deserializing untrusted data - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2352](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2352): Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks - -When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2353](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2353): Unsafe DataSet or DataTable in serializable type - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2354](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2354): Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2355](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2355): Unsafe DataSet or DataTable type found in deserializable object graph - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2356](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2356): Unsafe DataSet or DataTable type in web deserializable object graph - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2361](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2361): Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data - -The method '{0}' is insecure when deserializing untrusted data. Make sure that auto-generated class containing the '{0}' call is not deserialized with untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2362](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2362): Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks - -When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. Ensure that the auto-generated type is never deserialized with untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3001): Review code for SQL injection vulnerabilities - -Potential SQL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3002): Review code for XSS vulnerabilities - -Potential cross-site scripting (XSS) vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3003](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3003): Review code for file path injection vulnerabilities - -Potential file path injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3004](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3004): Review code for information disclosure vulnerabilities - -Potential information disclosure vulnerability was found where '{0}' in method '{1}' may contain unintended information from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3005](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3005): Review code for LDAP injection vulnerabilities - -Potential LDAP injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3006](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3006): Review code for process command injection vulnerabilities - -Potential process command injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3007](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3007): Review code for open redirect vulnerabilities - -Potential open redirect vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3008): Review code for XPath injection vulnerabilities - -Potential XPath injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3009](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3009): Review code for XML injection vulnerabilities - -Potential XML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3010](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3010): Review code for XAML injection vulnerabilities - -Potential XAML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3011](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3011): Review code for DLL injection vulnerabilities - -Potential DLL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3012): Review code for regex injection vulnerabilities - -Potential regex injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3061](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3061): Do Not Add Schema By URL - -This overload of XmlSchemaCollection.Add method internally enables DTD processing on the XML reader instance used, and uses UrlResolver for resolving external XML entities. The outcome is information disclosure. Content from file system or network shares for the machine processing the XML can be exposed to attacker. In addition, an attacker can use this as a DoS vector. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3075](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3075): Insecure DTD processing in XML - -Using XmlTextReader.Load(), creating an insecure XmlReaderSettings instance when invoking XmlReader.Create(), setting the InnerXml property of the XmlDocument and enabling DTD processing using XmlUrlResolver insecurely can lead to information disclosure. Replace it with a call to the Load() method overload that takes an XmlReader instance, use XmlReader.Create() to accept XmlReaderSettings arguments or consider explicitly setting secure values. The DataViewSettingCollectionString property of DataViewManager should always be assigned from a trusted source, the DtdProcessing property should be set to false, and the XmlResolver property should be changed to XmlSecureResolver or null. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3076](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076): Insecure XSLT script processing. - -Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3077](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077): Insecure Processing in API Design, XmlDocument and XmlTextReader - -Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3147](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3147): Mark Verb Handlers With Validate Antiforgery Token - -Missing ValidateAntiForgeryTokenAttribute on controller action {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5350](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5350): Do Not Use Weak Cryptographic Algorithms - -Cryptographic algorithms degrade over time as attacks become for advances to attacker get access to more computation. Depending on the type and application of this cryptographic algorithm, further degradation of the cryptographic strength of it may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA-2 512, SHA-2 384, or SHA-2 256. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5351](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5351): Do Not Use Broken Cryptographic Algorithms - -An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5358](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5358): Review cipher mode usage with cryptography experts - -These cipher modes might be vulnerable to attacks. Consider using recommended modes (CBC, CTS). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5359](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5359): Do Not Disable Certificate Validation - -A certificate can help authenticate the identity of the server. Clients should validate the server certificate to ensure requests are sent to the intended server. If the ServerCertificateValidationCallback always returns 'true', any certificate will pass validation. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5360](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5360): Do Not Call Dangerous Methods In Deserialization - -Insecure Deserialization is a vulnerability which occurs when untrusted data is used to abuse the logic of an application, inflict a Denial-of-Service (DoS) attack, or even execute arbitrary code upon it being deserialized. It’s frequently possible for malicious users to abuse these deserialization features when the application is deserializing untrusted data which is under their control. Specifically, invoke dangerous methods in the process of deserialization. Successful insecure deserialization attacks could allow an attacker to carry out attacks such as DoS attacks, authentication bypasses, and remote code execution. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5361](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5361): Do Not Disable SChannel Use of Strong Crypto - -Starting with the .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes are recommended to use new protocols. The old ones have protocol weaknesses and are not supported. Setting Switch.System.Net.DontEnableSchUseStrongCrypto with true will use the old weak crypto check and opt out of the protocol migration. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5362](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5362): Potential reference cycle in deserialized object graph - -Review code that processes untrusted deserialized data for handling of unexpected reference cycles. An unexpected reference cycle should not cause the code to enter an infinite loop. Otherwise, an unexpected reference cycle can allow an attacker to DOS or exhaust the memory of the process when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5363](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5363): Do Not Disable Request Validation - -Request validation is a feature in ASP.NET that examines HTTP requests and determines whether they contain potentially dangerous content. This check adds protection from markup or code in the URL query string, cookies, or posted form values that might have been added for malicious purposes. So, it is generally desirable and should be left enabled for defense in depth. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5364](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5364): Do Not Use Deprecated Security Protocols - -Using a deprecated security protocol rather than the system default is risky. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5365](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5365): Do Not Disable HTTP Header Checking - -HTTP header checking enables encoding of the carriage return and newline characters, \r and \n, that are found in response headers. This encoding can help to avoid injection attacks that exploit an application that echoes untrusted data contained by the header. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5366](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5366): Use XmlReader for 'DataSet.ReadXml()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5367](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5367): Do Not Serialize Types With Pointer Fields - -Pointers are not "type safe" in the sense that you cannot guarantee the correctness of the memory they point at. So, serializing types with pointer fields is dangerous, as it may allow an attacker to control the pointer. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5368](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5368): Set ViewStateUserKey For Classes Derived From Page - -Setting the ViewStateUserKey property can help you prevent attacks on your application by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. Otherwise, there will be cross-site request forgery vulnerabilities. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5369](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5369): Use XmlReader for 'XmlSerializer.Deserialize()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5370](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5370): Use XmlReader for XmlValidatingReader constructor - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5371](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5371): Use XmlReader for 'XmlSchema.Read()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5372](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5372): Use XmlReader for XPathDocument constructor - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5373](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5373): Do not use obsolete key derivation function - -Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5374](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5374): Do Not Use XslTransform - -Do not use XslTransform. It does not restrict potentially dangerous external references. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5375](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5375): Do Not Use Account Shared Access Signature - -Shared Access Signatures(SAS) are a vital part of the security model for any application using Azure Storage, they should provide limited and safe permissions to your storage account to clients that don't have the account key. All of the operations available via a service SAS are also available via an account SAS, that is, account SAS is too powerful. So it is recommended to use Service SAS to delegate access more carefully. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5376](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5376): Use SharedAccessProtocol HttpsOnly - -HTTPS encrypts network traffic. Use HttpsOnly, rather than HttpOrHttps, to ensure network traffic is always encrypted to help prevent disclosure of sensitive data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5377](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5377): Use Container Level Access Policy - -No access policy identifier is specified, making tokens non-revocable. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5378](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5378): Do not disable ServicePointManagerSecurityProtocols - -Do not set Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols to true. Setting this switch limits Windows Communication Framework (WCF) to using Transport Layer Security (TLS) 1.0, which is insecure and obsolete. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5379](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5379): Ensure Key Derivation Function algorithm is sufficiently strong - -Some implementations of the Rfc2898DeriveBytes class allow for a hash algorithm to be specified in a constructor parameter or overwritten in the HashAlgorithm property. If a hash algorithm is specified, then it should be SHA-256 or higher. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5380](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5380): Do Not Add Certificates To Root Store - -By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5381](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5381): Ensure Certificates Are Not Added To Root Store - -By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5382](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5382): Use Secure Cookies In ASP.Net Core - -Applications available over HTTPS must use secure cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5383](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5383): Ensure Use Secure Cookies In ASP.Net Core - -Applications available over HTTPS must use secure cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5384](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5384): Do Not Use Digital Signature Algorithm (DSA) - -DSA is too weak to use. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5385](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5385): Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size - -Encryption algorithms are vulnerable to brute force attacks when too small a key size is used. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5386](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5386): Avoid hardcoding SecurityProtocolType value - -Avoid hardcoding SecurityProtocolType {0}, and instead use SecurityProtocolType.SystemDefault to allow the operating system to choose the best Transport Layer Security protocol to use. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5387](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5387): Do Not Use Weak Key Derivation Function With Insufficient Iteration Count - -When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5388](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5388): Ensure Sufficient Iteration Count When Using Weak Key Derivation Function - -When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5389](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5389): Do Not Add Archive Item's Path To The Target File System Path - -When extracting files from an archive and using the archive item's path, check if the path is safe. Archive path can be relative and can lead to file system access outside of the expected file system target path, leading to malicious config changes and remote code execution via lay-and-wait technique. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5390](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5390): Do not hard-code encryption key - -SymmetricAlgorithm's .Key property, or a method's rgbKey parameter, should never be a hard-coded value. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5391](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5391): Use antiforgery tokens in ASP.NET Core MVC controllers - -Handling a POST, PUT, PATCH, or DELETE request without validating an antiforgery token may be vulnerable to cross-site request forgery attacks. A cross-site request forgery attack can send malicious requests from an authenticated user to your ASP.NET Core MVC controller. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5392](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5392): Use DefaultDllImportSearchPaths attribute for P/Invokes - -By default, P/Invokes using DllImportAttribute probe a number of directories, including the current working directory for the library to load. This can be a security issue for certain applications, leading to DLL hijacking. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5393](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5393): Do not use unsafe DllImportSearchPath value - -There could be a malicious DLL in the default DLL search directories. Or, depending on where your application is run from, there could be a malicious DLL in the application's directory. Use a DllImportSearchPath value that specifies an explicit search path instead. The DllImportSearchPath flags that this rule looks for can be configured in .editorconfig. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5394](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394): Do not use insecure randomness - -Using a cryptographically weak pseudo-random number generator may allow an attacker to predict what security-sensitive value will be generated. Use a cryptographically strong random number generator if an unpredictable value is required, or ensure that weak pseudo-random numbers aren't used in a security-sensitive manner. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5395](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5395): Miss HttpVerb attribute for action methods - -All the methods that create, edit, delete, or otherwise modify data do so in the [HttpPost] overload of the method, which needs to be protected with the anti forgery attribute from request forgery. Performing a GET operation should be a safe operation that has no side effects and doesn't modify your persisted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5396](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5396): Set HttpOnly to true for HttpCookie - -As a defense in depth measure, ensure security sensitive HTTP cookies are marked as HttpOnly. This indicates web browsers should disallow scripts from accessing the cookies. Injected malicious scripts are a common way of stealing cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5397](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5397): Do not use deprecated SslProtocols values - -Older protocol versions of Transport Layer Security (TLS) are less secure than TLS 1.2 and TLS 1.3, and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5398](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5398): Avoid hardcoded SslProtocols values - -Current Transport Layer Security protocol versions may become deprecated if vulnerabilities are found. Avoid hardcoding SslProtocols values to keep your application secure. Use 'None' to let the Operating System choose a version. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5399](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5399): HttpClients should enable certificate revocation list checks - -Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5400](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5400): Ensure HttpClient certificate revocation list check is not disabled - -Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5401](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5401): Do not use CreateEncryptor with non-default IV - -Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5402](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5402): Use CreateEncryptor with the default IV - -Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5403](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5403): Do not hard-code certificate - -Hard-coded certificates in source code are vulnerable to being exploited. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA9998](https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers): Analyzer package has been deprecated - -FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## CA9999: Analyzer version mismatch - -Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [IL3000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000): Avoid using accessing Assembly file path when publishing as a single-file - -'{0}' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. - -|Item|Value| -|-|-| -|Category|Publish| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [IL3001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001): Avoid using accessing Assembly file path when publishing as a single-file - -'{0}' will throw for assemblies embedded in a single-file app - -|Item|Value| -|-|-| -|Category|Publish| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.sarif b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.sarif deleted file mode 100644 index b3a5eca27e..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.sarif +++ /dev/null @@ -1,5541 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/sarif-1.0.0", - "version": "1.0.0", - "runs": [ - { - "tool": { - "name": "Microsoft.CodeAnalysis.VersionCheckAnalyzer", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA9999": { - "id": "CA9999", - "shortDescription": "Analyzer version mismatch", - "fullDescription": "Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version.", - "defaultLevel": "warning", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "AnalyzerVersionCheckAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1000": { - "id": "CA1000", - "shortDescription": "Do not declare static members on generic types", - "fullDescription": "When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareStaticMembersOnGenericTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1002": { - "id": "CA1002", - "shortDescription": "Do not expose generic lists", - "fullDescription": "System.Collections.Generic.List is a generic collection that's designed for performance and not inheritance. List does not contain virtual members that make it easier to change the behavior of an inherited class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotExposeGenericLists", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1003": { - "id": "CA1003", - "shortDescription": "Use generic event handler instances", - "fullDescription": "A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1003", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "UseGenericEventHandlerInstancesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1005": { - "id": "CA1005", - "shortDescription": "Avoid excessive parameters on generic types", - "fullDescription": "The more type parameters a generic type contains, the more difficult it is to know and remember what each type parameter represents.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1005", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AvoidExcessiveParametersOnGenericTypes", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1008": { - "id": "CA1008", - "shortDescription": "Enums should have zero value", - "fullDescription": "The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be \"\"None\"\" to indicate that no values have been set in the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1008", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "EnumsShouldHaveZeroValueAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "RuleNoZero" - ] - } - }, - "CA1010": { - "id": "CA1010", - "shortDescription": "Generic interface should also be implemented", - "fullDescription": "To broaden the usability of a type, implement one of the generic interfaces. This is especially true for collections as they can then be used to populate generic collection types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1010", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CollectionsShouldImplementGenericInterfaceAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1012": { - "id": "CA1012", - "shortDescription": "Abstract types should not have public constructors", - "fullDescription": "Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AbstractTypesShouldNotHaveConstructorsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1014": { - "id": "CA1014", - "shortDescription": "Mark assemblies with CLSCompliant", - "fullDescription": "The Common Language Specification (CLS) defines naming restrictions, data types, and rules to which assemblies must conform if they will be used across programming languages. Good design dictates that all assemblies explicitly indicate CLS compliance by using CLSCompliantAttribute . If this attribute is not present on an assembly, the assembly is not compliant.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1014", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1016": { - "id": "CA1016", - "shortDescription": "Mark assemblies with assembly version", - "fullDescription": "The .NET Framework uses the version number to uniquely identify an assembly, and to bind to types in strongly named assemblies. The version number is used together with version and publisher policy. By default, applications run only with the assembly version with which they were built.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1017": { - "id": "CA1017", - "shortDescription": "Mark assemblies with ComVisible", - "fullDescription": "ComVisibleAttribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for the whole assembly and then overridden for individual types and type members. If this attribute is not present, the contents of the assembly are visible to COM clients.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1017", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MarkAssembliesWithComVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1018": { - "id": "CA1018", - "shortDescription": "Mark attributes with AttributeUsageAttribute", - "fullDescription": "Specify AttributeUsage on {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1018", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "MarkAttributesWithAttributeUsageAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1021": { - "id": "CA1021", - "shortDescription": "Avoid out parameters", - "fullDescription": "Passing types by reference (using 'out' or 'ref') requires experience with pointers, understanding how value types and reference types differ, and handling methods with multiple return values. Also, the difference between 'out' and 'ref' parameters is not widely understood.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1021", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AvoidOutParameters", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1024": { - "id": "CA1024", - "shortDescription": "Use properties where appropriate", - "fullDescription": "A public or protected method has a name that starts with \"\"Get\"\", takes no parameters, and returns a value that is not an array. The method might be a good candidate to become a property.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1024", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "UsePropertiesWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1027": { - "id": "CA1027", - "shortDescription": "Mark enums with FlagsAttribute", - "fullDescription": "An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1027", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "EnumWithFlagsAttributeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1028": { - "id": "CA1028", - "shortDescription": "Enum Storage should be Int32", - "fullDescription": "An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1028", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EnumStorageShouldBeInt32Analyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1030": { - "id": "CA1030", - "shortDescription": "Use events where appropriate", - "fullDescription": "This rule detects methods that have names that ordinarily would be used for events. If a method is called in response to a clearly defined state change, the method should be invoked by an event handler. Objects that call the method should raise events instead of calling the method directly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1030", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UseEventsWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1031": { - "id": "CA1031", - "shortDescription": "Do not catch general exception types", - "fullDescription": "A general exception such as System.Exception or System.SystemException or a disallowed exception type is caught in a catch statement, or a general catch clause is used. General and disallowed exceptions should not be caught.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotCatchGeneralExceptionTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1033": { - "id": "CA1033", - "shortDescription": "Interface methods should be callable by child types", - "fullDescription": "An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "InterfaceMethodsShouldBeCallableByChildTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1034": { - "id": "CA1034", - "shortDescription": "Nested types should not be visible", - "fullDescription": "A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1034", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "NestedTypesShouldNotBeVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1036": { - "id": "CA1036", - "shortDescription": "Override methods on comparable types", - "fullDescription": "A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1036", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "OverrideMethodsOnComparableTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1040": { - "id": "CA1040", - "shortDescription": "Avoid empty interfaces", - "fullDescription": "Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members; therefore, it does not define a contract that can be implemented.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "AvoidEmptyInterfacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1041": { - "id": "CA1041", - "shortDescription": "Provide ObsoleteAttribute message", - "fullDescription": "A type or member is marked by using a System.ObsoleteAttribute attribute that does not have its ObsoleteAttribute.Message property specified. When a type or member that is marked by using ObsoleteAttribute is compiled, the Message property of the attribute is displayed. This gives the user information about the obsolete type or member.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ProvideObsoleteAttributeMessageAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1043": { - "id": "CA1043", - "shortDescription": "Use Integral Or String Argument For Indexers", - "fullDescription": "Indexers, that is, indexed properties, should use integer or string types for the index. These types are typically used for indexing data structures and increase the usability of the library. Use of the Object type should be restricted to those cases where the specific integer or string type cannot be specified at design time. If the design requires other types for the index, reconsider whether the type represents a logical data store. If it does not represent a logical data store, use a method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1043", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UseIntegralOrStringArgumentForIndexersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1044": { - "id": "CA1044", - "shortDescription": "Properties should not be write only", - "fullDescription": "Although it is acceptable and often necessary to have a read-only property, the design guidelines prohibit the use of write-only properties. This is because letting a user set a value, and then preventing the user from viewing that value, does not provide any security. Also, without read access, the state of shared objects cannot be viewed, which limits their usefulness.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1044", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "PropertiesShouldNotBeWriteOnlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1045": { - "id": "CA1045", - "shortDescription": "Do not pass types by reference", - "fullDescription": "Passing types by reference (using out or ref) requires experience with pointers, understanding how value types and reference types differ, and handling methods that have multiple return values. Also, the difference between out and ref parameters is not widely understood.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1045", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotPassTypesByReference", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1046": { - "id": "CA1046", - "shortDescription": "Do not overload equality operator on reference types", - "fullDescription": "For reference types, the default implementation of the equality operator is almost always correct. By default, two references are equal only if they point to the same object. If the operator is providing meaningful value equality, the type should implement the generic 'System.IEquatable' interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1046", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotOverloadOperatorEqualsOnReferenceTypes", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1047": { - "id": "CA1047", - "shortDescription": "Do not declare protected member in sealed type", - "fullDescription": "Types declare protected members so that inheriting types can access or override the member. By definition, you cannot inherit from a sealed type, which means that protected methods on sealed types cannot be called.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1047", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareProtectedMembersInSealedTypes", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1050": { - "id": "CA1050", - "shortDescription": "Declare types in namespaces", - "fullDescription": "Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1050", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DeclareTypesInNamespacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1051": { - "id": "CA1051", - "shortDescription": "Do not declare visible instance fields", - "fullDescription": "The primary use of a field should be as an implementation detail. Fields should be private or internal and should be exposed by using properties.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareVisibleInstanceFieldsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1052": { - "id": "CA1052", - "shortDescription": "Static holder types should be Static or NotInheritable", - "fullDescription": "Type '{0}' is a static holder type but is neither static nor NotInheritable", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "StaticHolderTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1054": { - "id": "CA1054", - "shortDescription": "URI-like parameters should not be strings", - "fullDescription": "This rule assumes that the parameter represents a Uniform Resource Identifier (URI). A string representation or a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. 'System.Uri' class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriParametersShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1055": { - "id": "CA1055", - "shortDescription": "URI-like return values should not be strings", - "fullDescription": "This rule assumes that the method returns a URI. A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1055", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriReturnValuesShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1056": { - "id": "CA1056", - "shortDescription": "URI-like properties should not be strings", - "fullDescription": "This rule assumes that the property represents a Uniform Resource Identifier (URI). A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1056", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriPropertiesShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1060": { - "id": "CA1060", - "shortDescription": "Move pinvokes to native methods class", - "fullDescription": "Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1060", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MovePInvokesToNativeMethodsClassAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1061": { - "id": "CA1061", - "shortDescription": "Do not hide base class methods", - "fullDescription": "A method in a base type is hidden by an identically named method in a derived type when the parameter signature of the derived method differs only by types that are more weakly derived than the corresponding types in the parameter signature of the base method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1061", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotHideBaseClassMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1062": { - "id": "CA1062", - "shortDescription": "Validate arguments of public methods", - "fullDescription": "An externally visible method dereferences one of its reference arguments without verifying whether that argument is null (Nothing in Visual Basic). All reference arguments that are passed to externally visible methods should be checked against null. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. If the method is designed to be called only by known assemblies, you should make the method internal.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ValidateArgumentsOfPublicMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1063": { - "id": "CA1063", - "shortDescription": "Implement IDisposable Correctly", - "fullDescription": "All IDisposable types should implement the Dispose pattern correctly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1063", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ImplementIDisposableCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1064": { - "id": "CA1064", - "shortDescription": "Exceptions should be public", - "fullDescription": "An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1064", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ExceptionsShouldBePublicAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1066": { - "id": "CA1066", - "shortDescription": "Implement IEquatable when overriding Object.Equals", - "fullDescription": "When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1066", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EquatableAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1067": { - "id": "CA1067", - "shortDescription": "Override Object.Equals(object) when implementing IEquatable", - "fullDescription": "When a type T implements the interface IEquatable, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the \"principle of least surprise\".", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EquatableAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1068": { - "id": "CA1068", - "shortDescription": "CancellationToken parameters must come last", - "fullDescription": "Method '{0}' should take CancellationToken as the last parameter", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CancellationTokenParametersMustComeLastAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1069": { - "id": "CA1069", - "shortDescription": "Enums values should not be duplicated", - "fullDescription": "The field reference '{0}' is duplicated in this bitwise initialization", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1069", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EnumShouldNotHaveDuplicatedValues", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1070": { - "id": "CA1070", - "shortDescription": "Do not declare event fields as virtual", - "fullDescription": "Do not declare virtual events in a base class. Overridden events in a derived class have undefined behavior. The C# compiler does not handle this correctly and it is unpredictable whether a subscriber to the derived event will actually be subscribing to the base class event.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1070", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareEventFieldsAsVirtual", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1501": { - "id": "CA1501", - "shortDescription": "Avoid excessive inheritance", - "fullDescription": "Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1501", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1502": { - "id": "CA1502", - "shortDescription": "Avoid excessive complexity", - "fullDescription": "Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1502", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1505": { - "id": "CA1505", - "shortDescription": "Avoid unmaintainable code", - "fullDescription": "The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1506": { - "id": "CA1506", - "shortDescription": "Avoid excessive class coupling", - "fullDescription": "This rule measures class coupling by counting the number of unique type references that a symbol contains. Symbols that have a high degree of class coupling can be difficult to maintain. It is a good practice to have types and methods that exhibit low coupling and high cohesion. To fix this violation, try to redesign the code to reduce the number of types to which it is coupled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1506", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1508": { - "id": "CA1508", - "shortDescription": "Avoid dead conditional code", - "fullDescription": "'{0}' is never '{1}'. Remove or refactor the condition(s) to avoid dead code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "AvoidDeadConditionalCode", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1509": { - "id": "CA1509", - "shortDescription": "Invalid entry in code metrics rule specification file", - "fullDescription": "Invalid entry in code metrics rule specification file.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1509", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1700": { - "id": "CA1700", - "shortDescription": "Do not name enum values 'Reserved'", - "fullDescription": "This rule assumes that an enumeration member that has a name that contains \"reserved\" is not currently used but is a placeholder to be renamed or removed in a future version. Renaming or removing a member is a breaking change.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "DoNotNameEnumValuesReserved", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1707": { - "id": "CA1707", - "shortDescription": "Identifiers should not contain underscores", - "fullDescription": "By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotContainUnderscoresAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1708": { - "id": "CA1708", - "shortDescription": "Identifiers should differ by more than case", - "fullDescription": "Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1708", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "IdentifiersShouldDifferByMoreThanCaseAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1710": { - "id": "CA1710", - "shortDescription": "Identifiers should have correct suffix", - "fullDescription": "By convention, the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, have a suffix that is associated with the base type or interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldHaveCorrectSuffixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1711": { - "id": "CA1711", - "shortDescription": "Identifiers should not have incorrect suffix", - "fullDescription": "By convention, only the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, should end with specific reserved suffixes. Other type names should not use these reserved suffixes.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "IdentifiersShouldNotHaveIncorrectSuffixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1712": { - "id": "CA1712", - "shortDescription": "Do not prefix enum values with type name", - "fullDescription": "An enumeration's values should not start with the type name of the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "DoNotPrefixEnumValuesWithTypeNameAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1713": { - "id": "CA1713", - "shortDescription": "Events should not have 'Before' or 'After' prefix", - "fullDescription": "Event names should describe the action that raises the event. To name related events that are raised in a specific sequence, use the present or past tense to indicate the relative position in the sequence of actions. For example, when naming a pair of events that is raised when closing a resource, you might name it 'Closing' and 'Closed', instead of 'BeforeClose' and 'AfterClose'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1713", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EventsShouldNotHaveBeforeOrAfterPrefix", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1714": { - "id": "CA1714", - "shortDescription": "Flags enums should have plural names", - "fullDescription": "A public enumeration has the System.FlagsAttribute attribute, and its name does not end in \"\"s\"\". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EnumsShouldHavePluralNamesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1715": { - "id": "CA1715", - "shortDescription": "Identifiers should have correct prefix", - "fullDescription": "The name of an externally visible interface does not start with an uppercase \"\"I\"\". The name of a generic type parameter on an externally visible type or method does not start with an uppercase \"\"T\"\".", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldHaveCorrectPrefixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1716": { - "id": "CA1716", - "shortDescription": "Identifiers should not match keywords", - "fullDescription": "A namespace name or a type name matches a reserved keyword in a programming language. Identifiers for namespaces and types should not match keywords that are defined by languages that target the common language runtime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotMatchKeywordsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1717": { - "id": "CA1717", - "shortDescription": "Only FlagsAttribute enums should have plural names", - "fullDescription": "Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EnumsShouldHavePluralNamesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1720": { - "id": "CA1720", - "shortDescription": "Identifier contains type name", - "fullDescription": "Names of parameters and members are better used to communicate their meaning than to describe their type, which is expected to be provided by development tools. For names of members, if a data type name must be used, use a language-independent name instead of a language-specific one.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotContainTypeNames", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1721": { - "id": "CA1721", - "shortDescription": "Property names should not match get methods", - "fullDescription": "The name of a public or protected member starts with \"\"Get\"\" and otherwise matches the name of a public or protected property. \"\"Get\"\" methods and properties should have names that clearly distinguish their function.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1721", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "PropertyNamesShouldNotMatchGetMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1724": { - "id": "CA1724", - "shortDescription": "Type names should not match namespaces", - "fullDescription": "Type names should not match the names of namespaces that are defined in the .NET Framework class library. Violating this rule can reduce the usability of the library.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "TypeNamesShouldNotMatchNamespacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1725": { - "id": "CA1725", - "shortDescription": "Parameter names should match base declaration", - "fullDescription": "Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "ParameterNamesShouldMatchBaseDeclarationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1802": { - "id": "CA1802", - "shortDescription": "Use literals where appropriate", - "fullDescription": "A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at run?time.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1802", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseLiteralsWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1805": { - "id": "CA1805", - "shortDescription": "Do not initialize unnecessarily", - "fullDescription": "The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed. In some cases, such as with static readonly fields that permanently retain their default value, consider instead changing them to be constants or properties.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1805", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotInitializeUnnecessarilyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1806": { - "id": "CA1806", - "shortDescription": "Do not ignore method results", - "fullDescription": "A new object is created but never used; or a method that creates and returns a new string is called and the new string is never used; or a COM or P/Invoke method returns an HRESULT or error code that is never used.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotIgnoreMethodResultsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1814": { - "id": "CA1814", - "shortDescription": "Prefer jagged arrays over multidimensional", - "fullDescription": "A jagged array is an array whose elements are arrays. The arrays that make up the elements can be of different sizes, leading to less wasted space for some sets of data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1814", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferJaggedArraysOverMultidimensionalAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1815": { - "id": "CA1815", - "shortDescription": "Override equals and operator equals on value types", - "fullDescription": "For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1815", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1819": { - "id": "CA1819", - "shortDescription": "Properties should not return arrays", - "fullDescription": "Arrays that are returned by properties are not write-protected, even when the property is read-only. To keep the array tamper-proof, the property must return a copy of the array. Typically, users will not understand the adverse performance implications of calling such a property.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1819", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PropertiesShouldNotReturnArraysAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1821": { - "id": "CA1821", - "shortDescription": "Remove empty Finalizers", - "fullDescription": "Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1821", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "RemoveEmptyFinalizersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1822": { - "id": "CA1822", - "shortDescription": "Mark members as static", - "fullDescription": "Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "MarkMembersAsStaticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1823": { - "id": "CA1823", - "shortDescription": "Avoid unused private fields", - "fullDescription": "Private fields were detected that do not appear to be accessed in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "AvoidUnusedPrivateFieldsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2007": { - "id": "CA2007", - "shortDescription": "Consider calling ConfigureAwait on the awaited task", - "fullDescription": "When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotDirectlyAwaitATaskAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2011": { - "id": "CA2011", - "shortDescription": "Avoid infinite recursion", - "fullDescription": "Do not assign the property within its setter. This call might result in an infinite recursion.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2011", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "AvoidInfiniteRecursion", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2109": { - "id": "CA2109", - "shortDescription": "Review visible event handlers", - "fullDescription": "A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2109", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewVisibleEventHandlersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2119": { - "id": "CA2119", - "shortDescription": "Seal methods that satisfy private interfaces", - "fullDescription": "An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2119", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SealMethodsThatSatisfyPrivateInterfacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2200": { - "id": "CA2200", - "shortDescription": "Rethrow to preserve stack details", - "fullDescription": "Re-throwing caught exception changes stack information", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2200", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "RethrowToPreserveStackDetailsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2211": { - "id": "CA2211", - "shortDescription": "Non-constant fields should not be visible", - "fullDescription": "Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2211", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "NonConstantFieldsShouldNotBeVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2214": { - "id": "CA2214", - "shortDescription": "Do not call overridable methods in constructors", - "fullDescription": "Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotCallOverridableMethodsInConstructorsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2217": { - "id": "CA2217", - "shortDescription": "Do not mark enums with FlagsAttribute", - "fullDescription": "An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2217", - "properties": { - "category": "Usage", - "isEnabledByDefault": false, - "typeName": "EnumWithFlagsAttributeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2219": { - "id": "CA2219", - "shortDescription": "Do not raise exceptions in finally clauses", - "fullDescription": "When an exception is raised in a finally clause, the new exception hides the active exception. This makes the original error difficult to detect and debug.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2219", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotRaiseExceptionsInExceptionClausesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2225": { - "id": "CA2225", - "shortDescription": "Operator overloads have named alternates", - "fullDescription": "An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2225", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OperatorOverloadsHaveNamedAlternatesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2226": { - "id": "CA2226", - "shortDescription": "Operators should have symmetrical overloads", - "fullDescription": "A type implements the equality or inequality operator and does not implement the opposite operator.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2226", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OperatorsShouldHaveSymmetricalOverloadsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2227": { - "id": "CA2227", - "shortDescription": "Collection properties should be read only", - "fullDescription": "A writable collection property allows a user to replace the collection with a different collection. A read-only property stops the collection from being replaced but still allows the individual members to be set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CollectionPropertiesShouldBeReadOnlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2231": { - "id": "CA2231", - "shortDescription": "Overload operator equals on overriding value type Equals", - "fullDescription": "In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2231", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OverloadOperatorEqualsOnOverridingValueTypeEqualsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2244": { - "id": "CA2244", - "shortDescription": "Do not duplicate indexed element initializations", - "fullDescription": "Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2244", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AvoidDuplicateElementInitialization", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2245": { - "id": "CA2245", - "shortDescription": "Do not assign a property to itself", - "fullDescription": "The property {0} should not be assigned to itself", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2245", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AvoidPropertySelfAssignment", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2246": { - "id": "CA2246", - "shortDescription": "Assigning symbol and its member in the same statement", - "fullDescription": "Assigning to a symbol and its member (field/property) in the same statement is not recommended. It is not clear if the member access was intended to use symbol's old value prior to the assignment or new value from the assignment in this statement. For clarity, consider splitting the assignments into separate statements.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2246", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AssigningSymbolAndItsMemberInSameStatement", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1001": { - "id": "CA1001", - "shortDescription": "Types that own disposable fields should be disposable", - "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1019": { - "id": "CA1019", - "shortDescription": "Define accessors for attribute arguments", - "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "CSharpDefineAccessorsForAttributeArgumentsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1032": { - "id": "CA1032", - "shortDescription": "Implement standard exception constructors", - "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpImplementStandardExceptionConstructorsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1065": { - "id": "CA1065", - "shortDescription": "Do not raise exceptions in unexpected locations", - "fullDescription": "A method that is not expected to throw exceptions throws an exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1200": { - "id": "CA1200", - "shortDescription": "Avoid using cref tags with a prefix", - "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200", - "properties": { - "category": "Documentation", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidUsingCrefTagsWithAPrefixAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1507": { - "id": "CA1507", - "shortDescription": "Use nameof to express symbol names", - "fullDescription": "Using nameof helps keep your code valid when refactoring.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": true, - "typeName": "CSharpUseNameofInPlaceOfStringAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1812": { - "id": "CA1812", - "shortDescription": "Avoid uninstantiated internal classes", - "fullDescription": "An instance of an assembly-level type is not created by code in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidUninstantiatedInternalClasses", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2234": { - "id": "CA2234", - "shortDescription": "Pass system uri objects instead of strings", - "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CSharpPassSystemUriObjectsInsteadOfStringsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1001": { - "id": "CA1001", - "shortDescription": "Types that own disposable fields should be disposable", - "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1019": { - "id": "CA1019", - "shortDescription": "Define accessors for attribute arguments", - "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "BasicDefineAccessorsForAttributeArgumentsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1032": { - "id": "CA1032", - "shortDescription": "Implement standard exception constructors", - "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicImplementStandardExceptionConstructorsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1065": { - "id": "CA1065", - "shortDescription": "Do not raise exceptions in unexpected locations", - "fullDescription": "A method that is not expected to throw exceptions throws an exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1200": { - "id": "CA1200", - "shortDescription": "Avoid using cref tags with a prefix", - "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200", - "properties": { - "category": "Documentation", - "isEnabledByDefault": true, - "typeName": "BasicAvoidUsingCrefTagsWithAPrefixAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1507": { - "id": "CA1507", - "shortDescription": "Use nameof to express symbol names", - "fullDescription": "Using nameof helps keep your code valid when refactoring.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": true, - "typeName": "BasicUseNameofInPlaceOfStringAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1812": { - "id": "CA1812", - "shortDescription": "Avoid uninstantiated internal classes", - "fullDescription": "An instance of an assembly-level type is not created by code in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicAvoidUninstantiatedInternalClasses", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2218": { - "id": "CA2218", - "shortDescription": "Override GetHashCode on overriding Equals", - "fullDescription": "GetHashCode returns a value, based on the current instance, that is suited for hashing algorithms and data structures such as a hash table. Two objects that are the same type and are equal must return the same hash code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2218", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicOverrideGetHashCodeOnOverridingEqualsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2224": { - "id": "CA2224", - "shortDescription": "Override Equals on overloading operator equals", - "fullDescription": "A public type implements the equality operator but does not override Object.Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2224", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicOverrideEqualsOnOverloadingOperatorEqualsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2234": { - "id": "CA2234", - "shortDescription": "Pass system uri objects instead of strings", - "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicPassSystemUriObjectsInsteadOfStringsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetCore.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1303": { - "id": "CA1303", - "shortDescription": "Do not pass literals as localized parameters", - "fullDescription": "A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "DoNotPassLiteralsAsLocalizedParameters", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1304": { - "id": "CA1304", - "shortDescription": "Specify CultureInfo", - "fullDescription": "A method or constructor calls a member that has an overload that accepts a System.Globalization.CultureInfo parameter, and the method or constructor does not call the overload that takes the CultureInfo parameter. When a CultureInfo or System.IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyCultureInfoAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1305": { - "id": "CA1305", - "shortDescription": "Specify IFormatProvider", - "fullDescription": "A method or constructor calls one or more members that have overloads that accept a System.IFormatProvider parameter, and the method or constructor does not call the overload that takes the IFormatProvider parameter. When a System.Globalization.CultureInfo or IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be based on the input from/output displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider'. Otherwise, if the result will be stored and accessed by software, such as when it is loaded from disk/database and when it is persisted to disk/database, specify 'CultureInfo.InvariantCulture'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyIFormatProviderAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1307": { - "id": "CA1307", - "shortDescription": "Specify StringComparison for clarity", - "fullDescription": "A string comparison operation uses a method overload that does not set a StringComparison parameter. It is recommended to use the overload with StringComparison parameter for clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "SpecifyStringComparisonAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1308": { - "id": "CA1308", - "shortDescription": "Normalize strings to uppercase", - "fullDescription": "Strings should be normalized to uppercase. A small group of characters cannot make a round trip when they are converted to lowercase. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "NormalizeStringsToUppercaseAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1310": { - "id": "CA1310", - "shortDescription": "Specify StringComparison for correctness", - "fullDescription": "A string comparison operation uses a method overload that does not set a StringComparison parameter, hence its behavior could vary based on the current user's locale settings. It is strongly recommended to use the overload with StringComparison parameter for correctness and clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyStringComparisonAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1401": { - "id": "CA1401", - "shortDescription": "P/Invokes should not be visible", - "fullDescription": "A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1401", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "PInvokeDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1416": { - "id": "CA1416", - "shortDescription": "Validate platform compatibility", - "fullDescription": "Using platform dependent API on a component makes the code no longer work across all platforms.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "PlatformCompatibilityAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1417": { - "id": "CA1417", - "shortDescription": "Do not use 'OutAttribute' on string parameters for P/Invokes", - "fullDescription": "String parameters passed by value with the 'OutAttribute' can destabilize the runtime if the string is an interned string.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1417", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "DoNotUseOutAttributeStringPInvokeParametersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1810": { - "id": "CA1810", - "shortDescription": "Initialize reference type static fields inline", - "fullDescription": "A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "InitializeStaticFieldsInlineAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1813": { - "id": "CA1813", - "shortDescription": "Avoid unsealed attributes", - "fullDescription": "The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1813", - "properties": { - "category": "Performance", - "isEnabledByDefault": false, - "typeName": "AvoidUnsealedAttributesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1816": { - "id": "CA1816", - "shortDescription": "Dispose methods should call SuppressFinalize", - "fullDescription": "A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1816", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CallGCSuppressFinalizeCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1820": { - "id": "CA1820", - "shortDescription": "Test for empty strings using string length", - "fullDescription": "Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "TestForEmptyStringsUsingStringLengthAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1826": { - "id": "CA1826", - "shortDescription": "Do not use Enumerable methods on indexable collections", - "fullDescription": "This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1826", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1827": { - "id": "CA1827", - "shortDescription": "Do not use Count() or LongCount() when Any() can be used", - "fullDescription": "For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1827", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1828": { - "id": "CA1828", - "shortDescription": "Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used", - "fullDescription": "For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1828", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1829": { - "id": "CA1829", - "shortDescription": "Use Length/Count property instead of Count() when available", - "fullDescription": "Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1830": { - "id": "CA1830", - "shortDescription": "Prefer strongly-typed Append and Insert method overloads on StringBuilder", - "fullDescription": "StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferTypedStringBuilderAppendOverloads", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1831": { - "id": "CA1831", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on string values produces a copy of requested portion of the string. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1831", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1832": { - "id": "CA1832", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on array values produces a copy of requested portion of the array. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1832", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1833": { - "id": "CA1833", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on array values produces a copy of requested portion of the array. This copy is often unwanted when it is implicitly used as a Span or Memory value. Use the AsSpan method to avoid the copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1833", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1834": { - "id": "CA1834", - "shortDescription": "Consider using 'StringBuilder.Append(char)' when applicable", - "fullDescription": "'StringBuilder.Append(char)' is more efficient than 'StringBuilder.Append(string)' when the string is a single character. When calling 'Append' with a constant, prefer using a constant char rather than a constant string containing one character.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1834", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferConstCharOverConstUnitStringAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1835": { - "id": "CA1835", - "shortDescription": "Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'", - "fullDescription": "'Stream' has a 'ReadAsync' overload that takes a 'Memory' as the first argument, and a 'WriteAsync' overload that takes a 'ReadOnlyMemory' as the first argument. Prefer calling the memory based overloads, which are more efficient.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1835", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferStreamAsyncMemoryOverloads", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1836": { - "id": "CA1836", - "shortDescription": "Prefer IsEmpty over Count", - "fullDescription": "For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1836", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1837": { - "id": "CA1837", - "shortDescription": "Use 'Environment.ProcessId'", - "fullDescription": "'Environment.ProcessId' is simpler and faster than 'Process.GetCurrentProcess().Id'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1837", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseEnvironmentProcessId", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1838": { - "id": "CA1838", - "shortDescription": "Avoid 'StringBuilder' parameters for P/Invokes", - "fullDescription": "Marshalling of 'StringBuilder' always creates a native buffer copy, resulting in multiple allocations for one marshalling operation.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1838", - "properties": { - "category": "Performance", - "isEnabledByDefault": false, - "typeName": "AvoidStringBuilderPInvokeParametersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2000": { - "id": "CA2000", - "shortDescription": "Dispose objects before losing scope", - "fullDescription": "If a disposable object is not explicitly disposed before all references to it are out of scope, the object will be disposed at some indeterminate time when the garbage collector runs the finalizer of the object. Because an exceptional event might occur that will prevent the finalizer of the object from running, the object should be explicitly disposed instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2000", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DisposeObjectsBeforeLosingScope", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2002": { - "id": "CA2002", - "shortDescription": "Do not lock on objects with weak identity", - "fullDescription": "An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2002", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotLockOnObjectsWithWeakIdentityAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2008": { - "id": "CA2008", - "shortDescription": "Do not create tasks without passing a TaskScheduler", - "fullDescription": "Do not create tasks unless you are using one of the overloads that takes a TaskScheduler. The default is to schedule on TaskScheduler.Current, which would lead to deadlocks. Either use TaskScheduler.Default to schedule on the thread pool, or explicitly pass TaskScheduler.Current to make your intentions clear.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2008", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotCreateTasksWithoutPassingATaskSchedulerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2009": { - "id": "CA2009", - "shortDescription": "Do not call ToImmutableCollection on an ImmutableCollection value", - "fullDescription": "Do not call {0} on an {1} value", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2009", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotCallToImmutableCollectionOnAnImmutableCollectionValueAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2012": { - "id": "CA2012", - "shortDescription": "Use ValueTasks correctly", - "fullDescription": "ValueTasks returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2012", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "UseValueTasksCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2013": { - "id": "CA2013", - "shortDescription": "Do not use ReferenceEquals with value types", - "fullDescription": "Value type typed arguments are uniquely boxed for each call to this method, therefore the result is always false.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotUseReferenceEqualsWithValueTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2014": { - "id": "CA2014", - "shortDescription": "Do not use stackalloc in loops", - "fullDescription": "Stack space allocated by a stackalloc is only released at the end of the current method's invocation. Using it in a loop can result in unbounded stack growth and eventual stack overflow conditions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2014", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotUseStackallocInLoopsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2015": { - "id": "CA2015", - "shortDescription": "Do not define finalizers for types derived from MemoryManager", - "fullDescription": "Adding a finalizer to a type derived from MemoryManager may permit memory to be freed while it is still in use by a Span.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2015", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotDefineFinalizersForTypesDerivedFromMemoryManager", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2100": { - "id": "CA2100", - "shortDescription": "Review SQL queries for security vulnerabilities", - "fullDescription": "SQL queries that directly use user input can be vulnerable to SQL injection attacks. Review this SQL query for potential vulnerabilities, and consider using a parameterized SQL query.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2100", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "ReviewSqlQueriesForSecurityVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2101": { - "id": "CA2101", - "shortDescription": "Specify marshaling for P/Invoke string arguments", - "fullDescription": "A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2101", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "PInvokeDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2201": { - "id": "CA2201", - "shortDescription": "Do not raise reserved exception types", - "fullDescription": "An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2201", - "properties": { - "category": "Usage", - "isEnabledByDefault": false, - "typeName": "DoNotRaiseReservedExceptionTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2207": { - "id": "CA2207", - "shortDescription": "Initialize value type static fields inline", - "fullDescription": "A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2207", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "InitializeStaticFieldsInlineAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2208": { - "id": "CA2208", - "shortDescription": "Instantiate argument exceptions correctly", - "fullDescription": "A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2208", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "InstantiateArgumentExceptionsCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2213": { - "id": "CA2213", - "shortDescription": "Disposable fields should be disposed", - "fullDescription": "A type that implements System.IDisposable declares fields that are of types that also implement IDisposable. The Dispose method of the field is not called by the Dispose method of the declaring type. To fix a violation of this rule, call Dispose on fields that are of types that implement IDisposable if you are responsible for allocating and releasing the unmanaged resources held by the field.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2213", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposableFieldsShouldBeDisposed", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2215": { - "id": "CA2215", - "shortDescription": "Dispose methods should call base class dispose", - "fullDescription": "A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2215", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposeMethodsShouldCallBaseClassDispose", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2216": { - "id": "CA2216", - "shortDescription": "Disposable types should declare finalizer", - "fullDescription": "A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2216", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposableTypesShouldDeclareFinalizerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2229": { - "id": "CA2229", - "shortDescription": "Implement serialization constructors", - "fullDescription": "To fix a violation of this rule, implement the serialization constructor. For a sealed class, make the constructor private; otherwise, make it protected.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2229", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2235": { - "id": "CA2235", - "shortDescription": "Mark all non-serializable fields", - "fullDescription": "An instance field of a type that is not serializable is declared in a type that is serializable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2235", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2237": { - "id": "CA2237", - "shortDescription": "Mark ISerializable types with serializable", - "fullDescription": "To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2237", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2241": { - "id": "CA2241", - "shortDescription": "Provide correct arguments to formatting methods", - "fullDescription": "The format argument that is passed to System.String.Format does not contain a format item that corresponds to each object argument, or vice versa.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "ProvideCorrectArgumentsToFormattingMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2242": { - "id": "CA2242", - "shortDescription": "Test for NaN correctly", - "fullDescription": "This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2242", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "TestForNaNCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2243": { - "id": "CA2243", - "shortDescription": "Attribute string literals should parse correctly", - "fullDescription": "The string literal parameter of an attribute does not parse correctly for a URL, a GUID, or a version.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2243", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AttributeStringLiteralsShouldParseCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2247": { - "id": "CA2247", - "shortDescription": "Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum", - "fullDescription": "TaskCompletionSource has constructors that take TaskCreationOptions that control the underlying Task, and constructors that take object state that's stored in the task. Accidentally passing a TaskContinuationOptions instead of a TaskCreationOptions will result in the call treating the options as state.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2247", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotCreateTaskCompletionSourceWithWrongArguments", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2248": { - "id": "CA2248", - "shortDescription": "Provide correct 'enum' argument to 'Enum.HasFlag'", - "fullDescription": "'Enum.HasFlag' method expects the 'enum' argument to be of the same 'enum' type as the instance on which the method is invoked and that this 'enum' is marked with 'System.FlagsAttribute'. If these are different 'enum' types, an unhandled exception will be thrown at runtime. If the 'enum' type is not marked with 'System.FlagsAttribute' the call will always return 'false' at runtime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2248", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "ProvideCorrectArgumentToEnumHasFlag", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2249": { - "id": "CA2249", - "shortDescription": "Consider using 'string.Contains' instead of 'string.IndexOf'", - "fullDescription": "Calls to 'string.IndexOf' where the result is used to check for the presence/absence of a substring can be replaced by 'string.Contains'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "PreferStringContainsOverIndexOfAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2300": { - "id": "CA2300", - "shortDescription": "Do not use insecure deserializer BinaryFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect BinaryFormatter deserialization without a SerializationBinder set, then disable rule CA2300, and enable rules CA2301 and CA2302.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2300", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2301": { - "id": "CA2301", - "shortDescription": "Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2301", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2302": { - "id": "CA2302", - "shortDescription": "Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2302", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2305": { - "id": "CA2305", - "shortDescription": "Do not use insecure deserializer LosFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2305", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerLosFormatter", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2310": { - "id": "CA2310", - "shortDescription": "Do not use insecure deserializer NetDataContractSerializer", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect NetDataContractSerializer deserialization without a SerializationBinder set, then disable rule CA2310, and enable rules CA2311 and CA2312.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2310", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2311": { - "id": "CA2311", - "shortDescription": "Do not deserialize without first setting NetDataContractSerializer.Binder", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2311", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2312": { - "id": "CA2312", - "shortDescription": "Ensure NetDataContractSerializer.Binder is set before deserializing", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2312", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2315": { - "id": "CA2315", - "shortDescription": "Do not use insecure deserializer ObjectStateFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2315", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerObjectStateFormatter", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2321": { - "id": "CA2321", - "shortDescription": "Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Initialize JavaScriptSerializer without a JavaScriptTypeResolver specified, or initialize with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2321", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2322": { - "id": "CA2322", - "shortDescription": "Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Ensure that the JavaScriptSerializer is initialized without a JavaScriptTypeResolver specified, or initialized with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2322", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2326": { - "id": "CA2326", - "shortDescription": "Do not use TypeNameHandling values other than None", - "fullDescription": "Deserializing JSON when using a TypeNameHandling value other than None can be insecure. If you need to instead detect Json.NET deserialization when a SerializationBinder isn't specified, then disable rule CA2326, and enable rules CA2327, CA2328, CA2329, and CA2330.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2326", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "JsonNetTypeNameHandling", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2327": { - "id": "CA2327", - "shortDescription": "Do not use insecure JsonSerializerSettings", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2327", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureSettingsForJsonNet", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2328": { - "id": "CA2328", - "shortDescription": "Ensure that JsonSerializerSettings are secure", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, ensure TypeNameHandling.None is specified, or for values other than None, ensure a SerializationBinder is specified to restrict deserialized types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2328", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureSettingsForJsonNet", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2329": { - "id": "CA2329", - "shortDescription": "Do not deserialize with JsonSerializer using an insecure configuration", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2329", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2330": { - "id": "CA2330", - "shortDescription": "Ensure that JsonSerializer has a secure configuration when deserializing", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2330", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2350": { - "id": "CA2350", - "shortDescription": "Do not use DataTable.ReadXml() with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2350", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataTableReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2351": { - "id": "CA2351", - "shortDescription": "Do not use DataSet.ReadXml() with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2351", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2352": { - "id": "CA2352", - "shortDescription": "Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2352", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2353": { - "id": "CA2353", - "shortDescription": "Unsafe DataSet or DataTable in serializable type", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2353", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2354": { - "id": "CA2354", - "shortDescription": "Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2354", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInIFormatterSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2355": { - "id": "CA2355", - "shortDescription": "Unsafe DataSet or DataTable type found in deserializable object graph", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2355", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2356": { - "id": "CA2356", - "shortDescription": "Unsafe DataSet or DataTable type in web deserializable object graph", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2356", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInWebSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2361": { - "id": "CA2361", - "shortDescription": "Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. Make sure that auto-generated class containing the '{0}' call is not deserialized with untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2361", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2362": { - "id": "CA2362", - "shortDescription": "Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. Ensure that the auto-generated type is never deserialized with untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2362", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3001": { - "id": "CA3001", - "shortDescription": "Review code for SQL injection vulnerabilities", - "fullDescription": "Potential SQL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3001", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForSqlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3002": { - "id": "CA3002", - "shortDescription": "Review code for XSS vulnerabilities", - "fullDescription": "Potential cross-site scripting (XSS) vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3002", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXssVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3003": { - "id": "CA3003", - "shortDescription": "Review code for file path injection vulnerabilities", - "fullDescription": "Potential file path injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3003", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForFilePathInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3004": { - "id": "CA3004", - "shortDescription": "Review code for information disclosure vulnerabilities", - "fullDescription": "Potential information disclosure vulnerability was found where '{0}' in method '{1}' may contain unintended information from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3004", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForInformationDisclosureVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3005": { - "id": "CA3005", - "shortDescription": "Review code for LDAP injection vulnerabilities", - "fullDescription": "Potential LDAP injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3005", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForLdapInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3006": { - "id": "CA3006", - "shortDescription": "Review code for process command injection vulnerabilities", - "fullDescription": "Potential process command injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3006", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForCommandExecutionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3007": { - "id": "CA3007", - "shortDescription": "Review code for open redirect vulnerabilities", - "fullDescription": "Potential open redirect vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3007", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForOpenRedirectVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3008": { - "id": "CA3008", - "shortDescription": "Review code for XPath injection vulnerabilities", - "fullDescription": "Potential XPath injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3008", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXPathInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3009": { - "id": "CA3009", - "shortDescription": "Review code for XML injection vulnerabilities", - "fullDescription": "Potential XML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3009", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXmlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3010": { - "id": "CA3010", - "shortDescription": "Review code for XAML injection vulnerabilities", - "fullDescription": "Potential XAML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3010", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXamlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3011": { - "id": "CA3011", - "shortDescription": "Review code for DLL injection vulnerabilities", - "fullDescription": "Potential DLL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3011", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForDllInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3012": { - "id": "CA3012", - "shortDescription": "Review code for regex injection vulnerabilities", - "fullDescription": "Potential regex injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3012", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForRegexInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3061": { - "id": "CA3061", - "shortDescription": "Do Not Add Schema By URL", - "fullDescription": "This overload of XmlSchemaCollection.Add method internally enables DTD processing on the XML reader instance used, and uses UrlResolver for resolving external XML entities. The outcome is information disclosure. Content from file system or network shares for the machine processing the XML can be exposed to attacker. In addition, an attacker can use this as a DoS vector.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3061", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotAddSchemaByURL", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5350": { - "id": "CA5350", - "shortDescription": "Do Not Use Weak Cryptographic Algorithms", - "fullDescription": "Cryptographic algorithms degrade over time as attacks become for advances to attacker get access to more computation. Depending on the type and application of this cryptographic algorithm, further degradation of the cryptographic strength of it may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA-2 512, SHA-2 384, or SHA-2 256.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5350", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5351": { - "id": "CA5351", - "shortDescription": "Do Not Use Broken Cryptographic Algorithms", - "fullDescription": "An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5351", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5358": { - "id": "CA5358", - "shortDescription": "Review cipher mode usage with cryptography experts", - "fullDescription": "These cipher modes might be vulnerable to attacks. Consider using recommended modes (CBC, CTS).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5358", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ApprovedCipherModeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5359": { - "id": "CA5359", - "shortDescription": "Do Not Disable Certificate Validation", - "fullDescription": "A certificate can help authenticate the identity of the server. Clients should validate the server certificate to ensure requests are sent to the intended server. If the ServerCertificateValidationCallback always returns 'true', any certificate will pass validation.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5359", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableCertificateValidation", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5360": { - "id": "CA5360", - "shortDescription": "Do Not Call Dangerous Methods In Deserialization", - "fullDescription": "Insecure Deserialization is a vulnerability which occurs when untrusted data is used to abuse the logic of an application, inflict a Denial-of-Service (DoS) attack, or even execute arbitrary code upon it being deserialized. It’s frequently possible for malicious users to abuse these deserialization features when the application is deserializing untrusted data which is under their control. Specifically, invoke dangerous methods in the process of deserialization. Successful insecure deserialization attacks could allow an attacker to carry out attacks such as DoS attacks, authentication bypasses, and remote code execution.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5360", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotCallDangerousMethodsInDeserialization", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5361": { - "id": "CA5361", - "shortDescription": "Do Not Disable SChannel Use of Strong Crypto", - "fullDescription": "Starting with the .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes are recommended to use new protocols. The old ones have protocol weaknesses and are not supported. Setting Switch.System.Net.DontEnableSchUseStrongCrypto with true will use the old weak crypto check and opt out of the protocol migration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5361", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSetSwitch", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5362": { - "id": "CA5362", - "shortDescription": "Potential reference cycle in deserialized object graph", - "fullDescription": "Review code that processes untrusted deserialized data for handling of unexpected reference cycles. An unexpected reference cycle should not cause the code to enter an infinite loop. Otherwise, an unexpected reference cycle can allow an attacker to DOS or exhaust the memory of the process when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5362", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "PotentialReferenceCycleInDeserializedObjectGraph", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5363": { - "id": "CA5363", - "shortDescription": "Do Not Disable Request Validation", - "fullDescription": "Request validation is a feature in ASP.NET that examines HTTP requests and determines whether they contain potentially dangerous content. This check adds protection from markup or code in the URL query string, cookies, or posted form values that might have been added for malicious purposes. So, it is generally desirable and should be left enabled for defense in depth.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5363", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableRequestValidation", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5364": { - "id": "CA5364", - "shortDescription": "Do Not Use Deprecated Security Protocols", - "fullDescription": "Using a deprecated security protocol rather than the system default is risky.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5364", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseDeprecatedSecurityProtocols", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5365": { - "id": "CA5365", - "shortDescription": "Do Not Disable HTTP Header Checking", - "fullDescription": "HTTP header checking enables encoding of the carriage return and newline characters, \\r and \\n, that are found in response headers. This encoding can help to avoid injection attacks that exploit an application that echoes untrusted data contained by the header.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5365", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableHTTPHeaderChecking", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5366": { - "id": "CA5366", - "shortDescription": "Use XmlReader for 'DataSet.ReadXml()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5366", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5367": { - "id": "CA5367", - "shortDescription": "Do Not Serialize Types With Pointer Fields", - "fullDescription": "Pointers are not \"type safe\" in the sense that you cannot guarantee the correctness of the memory they point at. So, serializing types with pointer fields is dangerous, as it may allow an attacker to control the pointer.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5367", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSerializeTypeWithPointerFields", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5368": { - "id": "CA5368", - "shortDescription": "Set ViewStateUserKey For Classes Derived From Page", - "fullDescription": "Setting the ViewStateUserKey property can help you prevent attacks on your application by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. Otherwise, there will be cross-site request forgery vulnerabilities.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5368", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SetViewStateUserKey", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5369": { - "id": "CA5369", - "shortDescription": "Use XmlReader for 'XmlSerializer.Deserialize()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5369", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForDeserialize", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5370": { - "id": "CA5370", - "shortDescription": "Use XmlReader for XmlValidatingReader constructor", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5370", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForValidatingReader", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5371": { - "id": "CA5371", - "shortDescription": "Use XmlReader for 'XmlSchema.Read()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5371", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForSchemaRead", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5372": { - "id": "CA5372", - "shortDescription": "Use XmlReader for XPathDocument constructor", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5372", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForXPathDocument", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5373": { - "id": "CA5373", - "shortDescription": "Do not use obsolete key derivation function", - "fullDescription": "Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5373", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseObsoleteKDFAlgorithm", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5374": { - "id": "CA5374", - "shortDescription": "Do Not Use XslTransform", - "fullDescription": "Do not use XslTransform. It does not restrict potentially dangerous external references.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5374", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseXslTransform", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5375": { - "id": "CA5375", - "shortDescription": "Do Not Use Account Shared Access Signature", - "fullDescription": "Shared Access Signatures(SAS) are a vital part of the security model for any application using Azure Storage, they should provide limited and safe permissions to your storage account to clients that don't have the account key. All of the operations available via a service SAS are also available via an account SAS, that is, account SAS is too powerful. So it is recommended to use Service SAS to delegate access more carefully.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5375", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseAccountSAS", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5376": { - "id": "CA5376", - "shortDescription": "Use SharedAccessProtocol HttpsOnly", - "fullDescription": "HTTPS encrypts network traffic. Use HttpsOnly, rather than HttpOrHttps, to ensure network traffic is always encrypted to help prevent disclosure of sensitive data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5376", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSharedAccessProtocolHttpsOnly", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5377": { - "id": "CA5377", - "shortDescription": "Use Container Level Access Policy", - "fullDescription": "No access policy identifier is specified, making tokens non-revocable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5377", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseContainerLevelAccessPolicy", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5378": { - "id": "CA5378", - "shortDescription": "Do not disable ServicePointManagerSecurityProtocols", - "fullDescription": "Do not set Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols to true. Setting this switch limits Windows Communication Framework (WCF) to using Transport Layer Security (TLS) 1.0, which is insecure and obsolete.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5378", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSetSwitch", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5379": { - "id": "CA5379", - "shortDescription": "Ensure Key Derivation Function algorithm is sufficiently strong", - "fullDescription": "Some implementations of the Rfc2898DeriveBytes class allow for a hash algorithm to be specified in a constructor parameter or overwritten in the HashAlgorithm property. If a hash algorithm is specified, then it should be SHA-256 or higher.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5379", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseWeakKDFAlgorithm", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5380": { - "id": "CA5380", - "shortDescription": "Do Not Add Certificates To Root Store", - "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5380", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotInstallRootCert", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5381": { - "id": "CA5381", - "shortDescription": "Ensure Certificates Are Not Added To Root Store", - "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5381", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotInstallRootCert", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5382": { - "id": "CA5382", - "shortDescription": "Use Secure Cookies In ASP.Net Core", - "fullDescription": "Applications available over HTTPS must use secure cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5382", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSecureCookiesASPNetCore", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5383": { - "id": "CA5383", - "shortDescription": "Ensure Use Secure Cookies In ASP.Net Core", - "fullDescription": "Applications available over HTTPS must use secure cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5383", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSecureCookiesASPNetCore", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5384": { - "id": "CA5384", - "shortDescription": "Do Not Use Digital Signature Algorithm (DSA)", - "fullDescription": "DSA is too weak to use.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5384", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseDSA", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5385": { - "id": "CA5385", - "shortDescription": "Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size", - "fullDescription": "Encryption algorithms are vulnerable to brute force attacks when too small a key size is used.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5385", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseRSAWithSufficientKeySize", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5386": { - "id": "CA5386", - "shortDescription": "Avoid hardcoding SecurityProtocolType value", - "fullDescription": "Avoid hardcoding SecurityProtocolType {0}, and instead use SecurityProtocolType.SystemDefault to allow the operating system to choose the best Transport Layer Security protocol to use.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5386", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDeprecatedSecurityProtocols", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5387": { - "id": "CA5387", - "shortDescription": "Do Not Use Weak Key Derivation Function With Insufficient Iteration Count", - "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5387", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseWeakKDFInsufficientIterationCount", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5388": { - "id": "CA5388", - "shortDescription": "Ensure Sufficient Iteration Count When Using Weak Key Derivation Function", - "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5388", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseWeakKDFInsufficientIterationCount", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5389": { - "id": "CA5389", - "shortDescription": "Do Not Add Archive Item's Path To The Target File System Path", - "fullDescription": "When extracting files from an archive and using the archive item's path, check if the path is safe. Archive path can be relative and can lead to file system access outside of the expected file system target path, leading to malicious config changes and remote code execution via lay-and-wait technique.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5389", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotAddArchiveItemPathToTheTargetFileSystemPath", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5390": { - "id": "CA5390", - "shortDescription": "Do not hard-code encryption key", - "fullDescription": "SymmetricAlgorithm's .Key property, or a method's rgbKey parameter, should never be a hard-coded value.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5390", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotHardCodeEncryptionKey", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5391": { - "id": "CA5391", - "shortDescription": "Use antiforgery tokens in ASP.NET Core MVC controllers", - "fullDescription": "Handling a POST, PUT, PATCH, or DELETE request without validating an antiforgery token may be vulnerable to cross-site request forgery attacks. A cross-site request forgery attack can send malicious requests from an authenticated user to your ASP.NET Core MVC controller.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5391", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseAutoValidateAntiforgeryToken", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5392": { - "id": "CA5392", - "shortDescription": "Use DefaultDllImportSearchPaths attribute for P/Invokes", - "fullDescription": "By default, P/Invokes using DllImportAttribute probe a number of directories, including the current working directory for the library to load. This can be a security issue for certain applications, leading to DLL hijacking.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5392", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseDefaultDllImportSearchPathsAttribute", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5393": { - "id": "CA5393", - "shortDescription": "Do not use unsafe DllImportSearchPath value", - "fullDescription": "There could be a malicious DLL in the default DLL search directories. Or, depending on where your application is run from, there could be a malicious DLL in the application's directory. Use a DllImportSearchPath value that specifies an explicit search path instead. The DllImportSearchPath flags that this rule looks for can be configured in .editorconfig.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5393", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseDefaultDllImportSearchPathsAttribute", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5394": { - "id": "CA5394", - "shortDescription": "Do not use insecure randomness", - "fullDescription": "Using a cryptographically weak pseudo-random number generator may allow an attacker to predict what security-sensitive value will be generated. Use a cryptographically strong random number generator if an unpredictable value is required, or ensure that weak pseudo-random numbers aren't used in a security-sensitive manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureRandomness", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5395": { - "id": "CA5395", - "shortDescription": "Miss HttpVerb attribute for action methods", - "fullDescription": "All the methods that create, edit, delete, or otherwise modify data do so in the [HttpPost] overload of the method, which needs to be protected with the anti forgery attribute from request forgery. Performing a GET operation should be a safe operation that has no side effects and doesn't modify your persisted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5395", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseAutoValidateAntiforgeryToken", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5396": { - "id": "CA5396", - "shortDescription": "Set HttpOnly to true for HttpCookie", - "fullDescription": "As a defense in depth measure, ensure security sensitive HTTP cookies are marked as HttpOnly. This indicates web browsers should disallow scripts from accessing the cookies. Injected malicious scripts are a common way of stealing cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5396", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "SetHttpOnlyForHttpCookie", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5397": { - "id": "CA5397", - "shortDescription": "Do not use deprecated SslProtocols values", - "fullDescription": "Older protocol versions of Transport Layer Security (TLS) are less secure than TLS 1.2 and TLS 1.3, and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5397", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SslProtocolsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5398": { - "id": "CA5398", - "shortDescription": "Avoid hardcoded SslProtocols values", - "fullDescription": "Current Transport Layer Security protocol versions may become deprecated if vulnerabilities are found. Avoid hardcoding SslProtocols values to keep your application secure. Use 'None' to let the Operating System choose a version.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5398", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "SslProtocolsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5399": { - "id": "CA5399", - "shortDescription": "HttpClients should enable certificate revocation list checks", - "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5399", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotDisableHttpClientCRLCheck", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5400": { - "id": "CA5400", - "shortDescription": "Ensure HttpClient certificate revocation list check is not disabled", - "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5400", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotDisableHttpClientCRLCheck", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5401": { - "id": "CA5401", - "shortDescription": "Do not use CreateEncryptor with non-default IV", - "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5401", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5402": { - "id": "CA5402", - "shortDescription": "Use CreateEncryptor with the default IV ", - "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5402", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5403": { - "id": "CA5403", - "shortDescription": "Do not hard-code certificate", - "fullDescription": "Hard-coded certificates in source code are vulnerable to being exploited.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5403", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotHardCodeCertificate", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - }, - "IL3000": { - "id": "IL3000", - "shortDescription": "Avoid using accessing Assembly file path when publishing as a single-file", - "fullDescription": "'{0}' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000", - "properties": { - "category": "Publish", - "isEnabledByDefault": true, - "typeName": "AvoidAssemblyLocationInSingleFile", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "IL3001": { - "id": "IL3001", - "shortDescription": "Avoid using accessing Assembly file path when publishing as a single-file", - "fullDescription": "'{0}' will throw for assemblies embedded in a single-file app", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001", - "properties": { - "category": "Publish", - "isEnabledByDefault": true, - "typeName": "AvoidAssemblyLocationInSingleFile", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetCore.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1309": { - "id": "CA1309", - "shortDescription": "Use ordinal string comparison", - "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "CSharpUseOrdinalStringComparisonAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1824": { - "id": "CA1824", - "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", - "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpMarkAssembliesWithNeutralResourcesLanguageAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1825": { - "id": "CA1825", - "shortDescription": "Avoid zero-length array allocations", - "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidZeroLengthArrayAllocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2016": { - "id": "CA2016", - "shortDescription": "Forward the 'CancellationToken' parameter to methods that take one", - "fullDescription": "Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "CSharpForwardCancellationTokenToInvocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetCore.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1309": { - "id": "CA1309", - "shortDescription": "Use ordinal string comparison", - "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "BasicUseOrdinalStringComparisonAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1824": { - "id": "CA1824", - "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", - "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicMarkAssembliesWithNeutralResourcesLanguageAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1825": { - "id": "CA1825", - "shortDescription": "Avoid zero-length array allocations", - "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicAvoidZeroLengthArrayAllocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2016": { - "id": "CA2016", - "shortDescription": "Forward the 'CancellationToken' parameter to methods that take one", - "fullDescription": "Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "BasicForwardCancellationTokenToInvocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetFramework.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1058": { - "id": "CA1058", - "shortDescription": "Types should not extend certain base types", - "fullDescription": "An externally visible type extends certain base types. Use one of the alternatives.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1058", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "TypesShouldNotExtendCertainBaseTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2153": { - "id": "CA2153", - "shortDescription": "Do Not Catch Corrupted State Exceptions", - "fullDescription": "Catching corrupted state exceptions could mask errors (such as access violations), resulting in inconsistent state of execution or making it easier for attackers to compromise system. Instead, catch and handle a more specific set of exception type(s) or re-throw the exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2153", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotCatchCorruptedStateExceptionsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3075": { - "id": "CA3075", - "shortDescription": "Insecure DTD processing in XML", - "fullDescription": "Using XmlTextReader.Load(), creating an insecure XmlReaderSettings instance when invoking XmlReader.Create(), setting the InnerXml property of the XmlDocument and enabling DTD processing using XmlUrlResolver insecurely can lead to information disclosure. Replace it with a call to the Load() method overload that takes an XmlReader instance, use XmlReader.Create() to accept XmlReaderSettings arguments or consider explicitly setting secure values. The DataViewSettingCollectionString property of DataViewManager should always be assigned from a trusted source, the DtdProcessing property should be set to false, and the XmlResolver property should be changed to XmlSecureResolver or null. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3075", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureDtdProcessingAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3147": { - "id": "CA3147", - "shortDescription": "Mark Verb Handlers With Validate Antiforgery Token", - "fullDescription": "Missing ValidateAntiForgeryTokenAttribute on controller action {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3147", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "MarkVerbHandlersWithValidateAntiforgeryTokenAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetFramework.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA3076": { - "id": "CA3076", - "shortDescription": "Insecure XSLT script processing.", - "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotUseInsecureXSLTScriptExecutionAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3077": { - "id": "CA3077", - "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", - "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetFramework.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA3076": { - "id": "CA3076", - "shortDescription": "Insecure XSLT script processing.", - "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "BasicDoNotUseInsecureXSLTScriptExecutionAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3077": { - "id": "CA3077", - "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", - "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "BasicDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/RulesMissingDocumentation.md b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/RulesMissingDocumentation.md deleted file mode 100644 index 1e4217990d..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/RulesMissingDocumentation.md +++ /dev/null @@ -1,5 +0,0 @@ -# Rules without documentation - -Rule ID | Missing Help Link | Title | ---------|-------------------|-------| -CA9999 | | Analyzer version mismatch | diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/EULA.rtf b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/EULA.rtf deleted file mode 100644 index b0e1b64001..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/EULA.rtf +++ /dev/null @@ -1,579 +0,0 @@ -{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff45\deff0\stshfdbch0\stshfloch31506\stshfhich31506\stshfbi31506\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;} -{\f3\fbidi \froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f10\fbidi \fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;} -{\f11\fbidi \fmodern\fcharset128\fprq1{\*\panose 02020609040205080304}MS Mincho{\*\falt ?l?r ??\'81\'66c};}{\f13\fbidi \fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt ??\'a1\'a7??};} -{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f43\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0502040204020203}Segoe UI;} -{\f44\fbidi \fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@SimSun;}{\f45\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Tahoma{\*\falt ?l?r ???};} -{\f46\fbidi \fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Trebuchet MS{\*\falt Arial};}{\f47\fbidi \fmodern\fcharset128\fprq1{\*\panose 02020609040205080304}@MS Mincho;} -{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} -{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f49\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\f50\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f52\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f53\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f54\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\f55\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f56\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f57\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f69\fbidi \fmodern\fcharset238\fprq1 Courier New CE;} -{\f70\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}{\f72\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f73\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f74\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);} -{\f75\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f76\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f77\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);} -{\f161\fbidi \fmodern\fcharset0\fprq1 MS Mincho Western{\*\falt ?l?r ??\'81\'66c};}{\f159\fbidi \fmodern\fcharset238\fprq1 MS Mincho CE{\*\falt ?l?r ??\'81\'66c};}{\f160\fbidi \fmodern\fcharset204\fprq1 MS Mincho Cyr{\*\falt ?l?r ??\'81\'66c};} -{\f162\fbidi \fmodern\fcharset161\fprq1 MS Mincho Greek{\*\falt ?l?r ??\'81\'66c};}{\f163\fbidi \fmodern\fcharset162\fprq1 MS Mincho Tur{\*\falt ?l?r ??\'81\'66c};}{\f166\fbidi \fmodern\fcharset186\fprq1 MS Mincho Baltic{\*\falt ?l?r ??\'81\'66c};} -{\f181\fbidi \fnil\fcharset0\fprq2 SimSun Western{\*\falt ??\'a1\'a7??};}{\f389\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f390\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f392\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;} -{\f393\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f396\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f397\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f419\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} -{\f420\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f422\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f423\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\f424\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);} -{\f425\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f426\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f427\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\f479\fbidi \fswiss\fcharset238\fprq2 Segoe UI CE;} -{\f480\fbidi \fswiss\fcharset204\fprq2 Segoe UI Cyr;}{\f482\fbidi \fswiss\fcharset161\fprq2 Segoe UI Greek;}{\f483\fbidi \fswiss\fcharset162\fprq2 Segoe UI Tur;}{\f484\fbidi \fswiss\fcharset177\fprq2 Segoe UI (Hebrew);} -{\f485\fbidi \fswiss\fcharset178\fprq2 Segoe UI (Arabic);}{\f486\fbidi \fswiss\fcharset186\fprq2 Segoe UI Baltic;}{\f487\fbidi \fswiss\fcharset163\fprq2 Segoe UI (Vietnamese);}{\f491\fbidi \fnil\fcharset0\fprq2 @SimSun Western;} -{\f499\fbidi \fswiss\fcharset238\fprq2 Tahoma CE{\*\falt ?l?r ???};}{\f500\fbidi \fswiss\fcharset204\fprq2 Tahoma Cyr{\*\falt ?l?r ???};}{\f502\fbidi \fswiss\fcharset161\fprq2 Tahoma Greek{\*\falt ?l?r ???};} -{\f503\fbidi \fswiss\fcharset162\fprq2 Tahoma Tur{\*\falt ?l?r ???};}{\f504\fbidi \fswiss\fcharset177\fprq2 Tahoma (Hebrew){\*\falt ?l?r ???};}{\f505\fbidi \fswiss\fcharset178\fprq2 Tahoma (Arabic){\*\falt ?l?r ???};} -{\f506\fbidi \fswiss\fcharset186\fprq2 Tahoma Baltic{\*\falt ?l?r ???};}{\f507\fbidi \fswiss\fcharset163\fprq2 Tahoma (Vietnamese){\*\falt ?l?r ???};}{\f508\fbidi \fswiss\fcharset222\fprq2 Tahoma (Thai){\*\falt ?l?r ???};} -{\f509\fbidi \fswiss\fcharset238\fprq2 Trebuchet MS CE{\*\falt Arial};}{\f510\fbidi \fswiss\fcharset204\fprq2 Trebuchet MS Cyr{\*\falt Arial};}{\f512\fbidi \fswiss\fcharset161\fprq2 Trebuchet MS Greek{\*\falt Arial};} -{\f513\fbidi \fswiss\fcharset162\fprq2 Trebuchet MS Tur{\*\falt Arial};}{\f516\fbidi \fswiss\fcharset186\fprq2 Trebuchet MS Baltic{\*\falt Arial};}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;}{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;} -{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;}{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} -{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} -{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} -{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} -{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} -{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} -{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;} -{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;} -{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} -{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} -{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} -{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} -{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; -\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;\cbackgroundone\ctint255\cshade255\red255\green255\blue255;}{\*\defchp \f31506\fs22 }{\*\defpap -\ql \fi-360\li360\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 -\af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \snext0 \sautoupd \sqformat \spriority0 \styrsid4934124 Normal;}{\s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 -\sbasedon0 \snext1 \slink15 \sqformat \styrsid4934124 heading 1;}{\s2\ql \fi-363\li720\ri0\sb120\sa120\widctlpar\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl1\outlinelevel1\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 -\ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext2 \slink16 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 2;}{\s3\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar -\tx1077\jclisttab\tx1440\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 -\sbasedon0 \snext3 \slink17 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 3;}{\s4\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl3\outlinelevel3\adjustright\rin0\lin1435\itap0 -\rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext4 \slink18 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 4;}{\s5\ql \fi-357\li1792\ri0\sb120\sa120\widctlpar -\tx1792\jclisttab\tx2155\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl4\outlinelevel4\adjustright\rin0\lin1792\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 -\sbasedon0 \snext5 \slink19 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 5;}{\s6\ql \fi-357\li2149\ri0\sb120\sa120\widctlpar\jclisttab\tx2152\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl5\outlinelevel5\adjustright\rin0\lin2149\itap0 -\rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext6 \slink20 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 6;}{\s7\ql \fi-357\li2506\ri0\sb120\sa120\widctlpar -\jclisttab\tx2509\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl6\outlinelevel6\adjustright\rin0\lin2506\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 -\sbasedon0 \snext7 \slink21 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 7;}{\s8\ql \fi-357\li2863\ri0\sb120\sa120\widctlpar\jclisttab\tx2866\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl7\outlinelevel7\adjustright\rin0\lin2863\itap0 -\rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext8 \slink22 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 8;}{ -\s9\ql \fi-358\li3221\ri0\sb120\sa120\widctlpar\jclisttab\tx3223\wrapdefault\aspalpha\aspnum\faauto\ls1\ilvl8\outlinelevel8\adjustright\rin0\lin3221\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext9 \slink23 \ssemihidden \sunhideused \sqformat \styrsid4934124 heading 9;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 -Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv -\ql \fi-360\li360\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0 \rtlch\fcs1 \af31506\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused -Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af45\afs19 \ltrch\fcs0 \b\f45\fs19 \sbasedon10 \slink1 \slocked \styrsid4934124 Heading 1 Char;}{\*\cs16 \additive \rtlch\fcs1 \ab\af45\afs19 \ltrch\fcs0 \b\f45\fs19 -\sbasedon10 \slink2 \slocked \ssemihidden \styrsid4934124 Heading 2 Char;}{\*\cs17 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \f45\fs19 \sbasedon10 \slink3 \slocked \ssemihidden \styrsid4934124 Heading 3 Char;}{\*\cs18 \additive \rtlch\fcs1 -\af45\afs19 \ltrch\fcs0 \f45\fs19 \sbasedon10 \slink4 \slocked \ssemihidden \styrsid4934124 Heading 4 Char;}{\*\cs19 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \f45\fs19 \sbasedon10 \slink5 \slocked \ssemihidden \styrsid4934124 Heading 5 Char;}{\* -\cs20 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \f45\fs19 \sbasedon10 \slink6 \slocked \ssemihidden \styrsid4934124 Heading 6 Char;}{\*\cs21 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 -\sbasedon10 \slink7 \slocked \ssemihidden \styrsid4934124 Heading 7 Char;}{\*\cs22 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 \sbasedon10 \slink8 \slocked \ssemihidden \styrsid4934124 Heading 8 Char;}{\*\cs23 -\additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 \sbasedon10 \slink9 \slocked \ssemihidden \styrsid4934124 Heading 9 Char;}{\*\cs24 \additive \rtlch\fcs1 \af0 \ltrch\fcs0 \f0\ul\cf2 -\sbasedon10 \ssemihidden \sunhideused \styrsid4934124 Hyperlink;}{\s25\ql \li357\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin357\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext25 \styrsid4934124 Body 1;}{\s26\ql \fi-363\li720\ri0\sb120\sa120\widctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext26 \styrsid4934124 -Bullet 2;}{\s27\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar\jclisttab\tx1080\wrapdefault\aspalpha\aspnum\faauto\ls3\adjustright\rin0\lin1077\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext27 \slink48 \styrsid4934124 Bullet 3;}{\s28\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 -\ab\af45\afs28\alang1025 \ltrch\fcs0 \b\fs28\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \styrsid4934124 Heading EULA;}{\s29\ql \li0\ri0\sb120\sa120\widctlpar\brdrb\brdrs\brdrw10\brsp20 -\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af45\afs28\alang1025 \ltrch\fcs0 \b\fs28\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \styrsid4934124 -Heading Software Title;}{\s30\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext30 \styrsid4934124 Preamble;}{\s31\ql \li0\ri0\sb120\sa120\widctlpar\brdrt\brdrs\brdrw10\brsp20 -\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon30 \snext31 \styrsid4934124 -Preamble Border Above;}{\s32\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 -\snext0 \styrsid4934124 Body 0 Bold;}{\s33\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \snext0 \styrsid4934124 Body 0;}{\s34\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs16\alang1025 \ltrch\fcs0 -\fs16\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext34 \slink35 \ssemihidden \sunhideused \styrsid11950712 Balloon Text;}{\*\cs35 \additive \rtlch\fcs1 \af45\afs16 \ltrch\fcs0 -\fs16\loch\f45\hich\af45\dbch\af11 \sbasedon10 \slink34 \slocked \ssemihidden \styrsid11950712 Balloon Text Char;}{\s36\ql \fi-357\li357\ri0\sb120\sa120\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls4\adjustright\rin0\lin357\itap0 -\rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext36 \styrsid11950712 Bullet 1;}{\s37\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar -\jclisttab\tx1437\wrapdefault\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1435\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 -\sbasedon0 \snext37 \styrsid11950712 Bullet 4;}{\s38\ql \fi-357\li1792\ri0\sb120\sa120\widctlpar\jclisttab\tx1795\wrapdefault\aspalpha\aspnum\faauto\ls6\adjustright\rin0\lin1792\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext38 \styrsid11950712 Bullet 5;}{\s39\ql \fi-357\li1077\ri0\sb120\sa120\widctlpar -\tx1077\jclisttab\tx1440\wrapdefault\aspalpha\aspnum\faauto\ls7\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 -\sbasedon3 \snext39 \slink50 \styrsid11950712 Heading 3 Bold;}{\s40\ql \fi-358\li1435\ri0\sb120\sa120\widctlpar\jclisttab\tx1437\wrapdefault\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1435\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\ul\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon37 \snext40 \styrsid11950712 Bullet 4 Underline;}{\*\cs41 \additive \rtlch\fcs1 \af45 \ltrch\fcs0 \f45\lang1033\langfe1033\langnp1033\langfenp1033 -\sbasedon10 \styrsid11950712 Body 2 Char;}{\*\cs42 \additive \rtlch\fcs1 \af45 \ltrch\fcs0 \f45\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \styrsid11950712 Body 3 Char;}{\*\cs43 \additive \rtlch\fcs1 \af0\afs16 \ltrch\fcs0 \fs16 -\sbasedon10 \ssemihidden \sunhideused \styrsid8850722 annotation reference;}{\s44\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs20\alang1025 \ltrch\fcs0 -\fs20\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext44 \slink45 \ssemihidden \sunhideused \styrsid8850722 annotation text;}{\*\cs45 \additive \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\loch\f45\hich\af45\dbch\af11 \sbasedon10 \slink44 \slocked \ssemihidden \styrsid8850722 Comment Text Char;}{\s46\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \ab\af45\afs20\alang1025 -\ltrch\fcs0 \b\fs20\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon44 \snext44 \slink47 \ssemihidden \sunhideused \styrsid8850722 annotation subject;}{\*\cs47 \additive \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 -\b\fs20\loch\f45\hich\af45\dbch\af11 \sbasedon45 \slink46 \slocked \ssemihidden \styrsid8850722 Comment Subject Char;}{\*\cs48 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 \sbasedon10 \slink27 \slocked \styrsid2434661 -Bullet 3 Char1;}{\s49\ql \fi-357\li357\ri0\sb120\sa120\widctlpar\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin357\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\ul\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon37 \snext49 \spriority0 \styrsid3941498 Bullet 4 Underlined;}{\*\cs50 \additive \rtlch\fcs1 \ab\af45\afs19 \ltrch\fcs0 \b\fs19\loch\f45\hich\af45\dbch\af11 -\sbasedon10 \slink39 \slocked \styrsid3941498 Heading 3 Bold Char;}{\s51\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs21\alang1025 \ltrch\fcs0 -\f37\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext51 \slink52 \ssemihidden \sunhideused \styrsid3941498 Plain Text;}{\*\cs52 \additive \rtlch\fcs1 \af0\afs21 \ltrch\fcs0 \f37\fs21 -\sbasedon10 \slink51 \slocked \ssemihidden \styrsid3941498 Plain Text Char;}{\s53\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext53 \slink54 \sunhideused \styrsid11152386 header;}{\*\cs54 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 -\sbasedon10 \slink53 \slocked \styrsid11152386 Header Char;}{\s55\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\f45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext55 \slink56 \sunhideused \styrsid11152386 footer;}{\*\cs56 \additive \rtlch\fcs1 \af45\afs19 \ltrch\fcs0 \fs19\loch\f45\hich\af45\dbch\af11 -\sbasedon10 \slink55 \slocked \styrsid11152386 Footer Char;}}{\*\listtable{\list\listtemplateid1122370636\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-357\li720\jclisttab\tx723\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1083\jclisttab\tx1083\lin1083 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693 -\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li1803\jclisttab\tx1803\lin1803 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689 -\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2523\jclisttab\tx2523\lin2523 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;} -\f2\fbias0\hres0\chhres0 \li3243\jclisttab\tx3243\lin3243 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li3963\jclisttab\tx3963\lin3963 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;} -\f3\fbias0\hres0\chhres0 \li4683\jclisttab\tx4683\lin4683 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li5403 -\jclisttab\tx5403\lin5403 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li6123 -\jclisttab\tx6123\lin6123 }{\listname ;}\listid152650329}{\list\listtemplateid1928476992{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 -\ab\ai0\af46\afs20 \ltrch\fcs0 \b\i0\f46\fs20\fbias0\hres0\chhres0 \fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;} -\rtlch\fcs1 \ab\ai0\af46\afs20 \ltrch\fcs0 \b\i0\f46\fs20\fbias0\hres0\chhres0 \fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab\ai0\af45\afs20 \ltrch\fcs0 \b\i0\f45\fs20\fbias0\hres0\chhres0 \s39\fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 -\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\strike0\f46\fs20\ulnone\fbias0\hres0\chhres0 \fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\strike0\f46\fs20\ulnone\fbias0\hres0\chhres0 \fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0 -\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \fi-357\li2149\jclisttab\tx2152\lin2149 } -{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \fi-357\li2506 -\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02i.;}{\levelnumbers;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 -\fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 -\b0\i0\f46\fs20\fbias0\hres0\chhres0 \fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid398796681}{\list\listtemplateid789093748\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 -{\leveltext\leveltemplateid-317712510\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \s26\fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693 -\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689 -\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;} -\f2\fbias0\hres0\chhres0 \li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;} -\f3\fbias0\hres0\chhres0 \li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li5760 -\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li6480 -\jclisttab\tx6480\lin6480 }{\listname ;}\listid477573462}{\list\listtemplateid830884688\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li1077\lin1077 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li1797\lin1797 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2517\lin2517 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li3237\lin3237 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li3957\lin3957 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4677\lin4677 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703 -\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li5397\lin5397 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713 -\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li6117\lin6117 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715 -\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6837\lin6837 }{\listname ;}\listid545946042}{\list\listtemplateid-1705225006{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 -\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab\ai0\af45\afs20 \ltrch\fcs0 \b\i0\f45\fs20\cf0\fbias0\hres0\chhres0 \s1\fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab\ai0\af45\afs20 \ltrch\fcs0 \b\i0\f45\fs20\fbias0\hres0\chhres0 \s2\fi-363\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc2\levelnfcn2\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab\ai0\af45\afs20 \ltrch\fcs0 \b\i0\f45\fs20\fbias0\hres0\chhres0 \s3\fi-357\li1077\jclisttab\tx1440\lin1077 }{\listlevel\levelnfc3\levelnfcn3 -\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\strike0\f46\fs20\ulnone\animtext0\striked0\fbias0\hres0\chhres0 \s4\fi-358\li1435 -\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc1\levelnfcn1\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 -\b0\i0\strike0\f46\fs20\ulnone\animtext0\striked0\fbias0\hres0\chhres0 \s5\fi-357\li1792\jclisttab\tx2155\lin1792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers -\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \s6\fi-357\li2149\jclisttab\tx2152\lin2149 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \s7\fi-357\li2506\jclisttab\tx2509\lin2506 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 -\levelindent0{\leveltext\'02i.;}{\levelnumbers;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \s8\fi-357\li2863\jclisttab\tx2866\lin2863 }{\listlevel\levelnfc255\levelnfcn255\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\levelspace0\levelindent0{\leveltext\'02A.;}{\levelnumbers;}\rtlch\fcs1 \ab0\ai0\af46\afs20 \ltrch\fcs0 \b0\i0\f46\fs20\fbias0\hres0\chhres0 \s9\fi-358\li3221\jclisttab\tx3223\lin3221 }{\listname ;}\listid752163927}{\list\listtemplateid-41362566 -\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \s37\fi-358\li1435\jclisttab\tx1437\lin1435 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 -{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;} -\f2\fbias0\hres0\chhres0 \li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li4320 -\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23 -\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1559511898}{\list\listtemplateid-743794326\listhybrid{\listlevel\levelnfc23\levelnfcn23 -\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid2033377338\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \s27\fi-357\li1077\jclisttab\tx1080\lin1077 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 -{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689 -\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;} -\f2\fbias0\hres0\chhres0 \li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1567649130}{\list\listtemplateid419070574\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li1080\lin1080 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691 -\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1800\lin1800 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li2520\lin2520 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 -\li3240\lin3240 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li3960\lin3960 }{\listlevel -\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li4680\lin4680 }{\listlevel\levelnfc23\levelnfcn23 -\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li5400\lin5400 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li6120\lin6120 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li6840\lin6840 }{\listname ;}\listid1589268858}{\list\listtemplateid1363474438\listhybrid{\listlevel\levelnfc23\levelnfcn23 -\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid-1175557160\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \s38\fi-357\li1792\jclisttab\tx1795\lin1792 }{\listlevel\levelnfc23\levelnfcn23\leveljc0 -\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1 -\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0 -{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689 -\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;} -\f2\fbias0\hres0\chhres0 \li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid1848404271}{\list\listtemplateid-761117952\listhybrid{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698713\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li717\lin717 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li1437\lin1437 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2157\lin2157 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li2877\lin2877 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li3597\lin3597 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4317\lin4317 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li5037\lin5037 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \li5757\lin5757 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext -\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6477\lin6477 }{\listname ;}\listid1870291363}{\list\listtemplateid1186249844\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0 -\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid1637229796\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \s36\fi-357\li357\jclisttab\tx360\lin357 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0 -\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0 -\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li2160\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext -\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0\hres0\chhres0 \li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691 -\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;} -\f10\fbias0\hres0\chhres0 \li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698689\'01\u-3913 ?;}{\levelnumbers;} -\f3\fbias0\hres0\chhres0 \li5040\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \li5760 -\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\leveltemplateid67698693\'01\u-3929 ?;}{\levelnumbers;}\f10\fbias0\hres0\chhres0 \li6480 -\jclisttab\tx6480\lin6480 }{\listname ;}\listid2054619191}}{\*\listoverridetable{\listoverride\listid752163927\listoverridecount9{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat -\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel -\listoverridestartat\levelstartat1}\ls1}{\listoverride\listid477573462\listoverridecount0\ls2}{\listoverride\listid1567649130\listoverridecount0\ls3}{\listoverride\listid2054619191\listoverridecount0\ls4}{\listoverride\listid1559511898 -\listoverridecount0\ls5}{\listoverride\listid1848404271\listoverridecount0\ls6}{\listoverride\listid398796681\listoverridecount0\ls7}{\listoverride\listid545946042\listoverridecount0\ls8}{\listoverride\listid752163927\listoverridecount9{\lfolevel -\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat -\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}{\lfolevel\listoverridestartat\levelstartat1}\ls9}{\listoverride\listid1870291363\listoverridecount0\ls10}{\listoverride\listid152650329 -\listoverridecount0\ls11}{\listoverride\listid1589268858\listoverridecount0\ls12}}{\*\pgptbl {\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid79668\rsid150779\rsid211660\rsid263352\rsid489647\rsid528777\rsid686391\rsid1145719\rsid1335391\rsid1714580 -\rsid2040850\rsid2434661\rsid2633486\rsid2635842\rsid2695079\rsid2902063\rsid2965976\rsid3041209\rsid3418540\rsid3630040\rsid3634687\rsid3744555\rsid3875660\rsid3882158\rsid3882522\rsid3941498\rsid4149814\rsid4537652\rsid4611858\rsid4740391\rsid4742223 -\rsid4748609\rsid4801980\rsid4805534\rsid4805706\rsid4929965\rsid4934124\rsid5113462\rsid5262441\rsid5309509\rsid5402219\rsid5467606\rsid5471954\rsid5720387\rsid6124814\rsid6171721\rsid6292707\rsid6364904\rsid6424248\rsid6496414\rsid6561381\rsid6584761 -\rsid6620178\rsid6643866\rsid6755756\rsid6833860\rsid7040710\rsid7080991\rsid7099326\rsid7344474\rsid7420369\rsid7503579\rsid7698999\rsid7756319\rsid7879410\rsid8007569\rsid8205106\rsid8334492\rsid8347579\rsid8455816\rsid8586851\rsid8662808\rsid8850722 -\rsid8921755\rsid9004944\rsid9072635\rsid9135771\rsid9176743\rsid9306427\rsid9380011\rsid9399500\rsid9448986\rsid9465849\rsid9584906\rsid9722926\rsid9728818\rsid9835407\rsid9860928\rsid9902756\rsid10428435\rsid11152386\rsid11303858\rsid11408012 -\rsid11496807\rsid11677882\rsid11690930\rsid11950712\rsid12545879\rsid12584315\rsid12868905\rsid13056010\rsid13066823\rsid13513072\rsid13776901\rsid13967657\rsid14293912\rsid14435085\rsid14507627\rsid14684443\rsid14685080\rsid14707821\rsid14712272 -\rsid14958727\rsid15278441\rsid15287965\rsid15364209\rsid15494051\rsid15539022\rsid15602734\rsid15749471\rsid15804309\rsid15809401\rsid15934616\rsid15949319\rsid15950790\rsid16065250\rsid16073823\rsid16334972\rsid16388644\rsid16405449\rsid16537650 -\rsid16594836\rsid16653828\rsid16715114}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\creatim\yr2017\mo6\dy9\hr12\min41}{\revtim\yr2019\mo4\dy17\hr16\min17} -{\version1}{\edmins0}{\nofpages3}{\nofwords1376}{\nofchars7844}{\nofcharsws9202}{\vern105}}{\*\userprops {\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled}\proptype30{\staticval True}{\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb859950 -28c_SiteId}\proptype30{\staticval 72f988bf-86f1-41af-91ab-2d7cd011db47}{\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref}\proptype30{\staticval https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47}{\propname MS -IP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetBy}\proptype30{\staticval kaseyu@microsoft.com}{\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate}\proptype30{\staticval 2017-06-09T12:41:20.3343362-07:00}{\propname MSIP_Label_f42aa342-8706 --4288-bd11-ebb85995028c_Name}\proptype30{\staticval General}{\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application}\proptype30{\staticval Microsoft Azure Information Protection}{\propname MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ext -ended_MSFT_Method}\proptype30{\staticval Automatic}{\propname Sensitivity}\proptype30{\staticval General}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}} -\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect -\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen -\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1 -\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\rempersonalinfo\allowfieldendsel -\wrppunct\asianbrkrule\rsidroot4934124\newtblstyruls\nogrowautofit\remdttm\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal -\nouicompat \fet0{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0{\*\ftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11152386 \rtlch\fcs1 \af45\afs19\alang1025 -\ltrch\fcs0 \fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3744555 \chftnsep -\par }}{\*\ftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11152386 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3744555 \chftnsepc -\par }}{\*\aftnsep \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11152386 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3744555 \chftnsep -\par }}{\*\aftnsepc \ltrpar \pard\plain \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid11152386 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3744555 \chftnsepc -\par }}\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid9860928\sftnbj {\headerl \ltrpar \pard\plain \ltrpar\s53\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 -\rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\headerr \ltrpar \pard\plain \ltrpar\s53\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\footerl \ltrpar \pard\plain \ltrpar\s55\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\footerr \ltrpar \pard\plain \ltrpar\s55\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\headerf \ltrpar \pard\plain \ltrpar\s53\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\footerf \ltrpar \pard\plain \ltrpar\s55\ql \li0\ri0\widctlpar\tqc\tx4680\tqr\tx9360\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 -\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}} -{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 -\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar -\s28\ql \li0\ri0\sb120\sa120\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs28\alang1025 \ltrch\fcs0 -\b\fs28\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS -\par }\pard\plain \ltrpar\s29\ql \li0\ri0\sb120\sa120\nowidctlpar\brdrb\brdrs\brdrw10\brsp20 \wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs28\alang1025 \ltrch\fcs0 -\b\fs28\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 MICROSOFT }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\caps\fs20\dbch\af13\insrsid16594836 \hich\af45\dbch\af13\loch\f45 Code ANALYSIS 201}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid8347579 \hich\af45\dbch\af13\loch\f45 9}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\cf19\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 NONE}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par }\pard\plain \ltrpar\s30\ql \li0\ri0\sb120\sa120\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. They apply to the softwa\hich\af45\dbch\af13\loch\f45 re named above. The terms also apply to any Microsoft}{\rtlch\fcs1 -\ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid2434661\charrsid15278441 \hich\af45\dbch\af13\loch\f45 services or updates for the software, except to the extent those have different terms.}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par }\pard\plain \ltrpar\s31\ql \li0\ri0\sb120\sa120\nowidctlpar\brdrt\brdrs\brdrw10\brsp20 \wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -If you comply with these license terms, you have the rights below. -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 1.\tab}}\pard\plain \ltrpar\s1\ql \fi-360\li360\ri0\sb120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin360\itap0\pararsid15287965 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 INSTALLATION AND USE RIGHTS. -\par }\pard\plain \ltrpar\s27\ql \fi-360\li720\ri0\sa120\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin720\itap0\pararsid15287965 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -You may install and use any number of copies of the software to develop and test your }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid6292707\charrsid15278441 \hich\af45\dbch\af13\loch\f45 applications}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 . }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid2434661\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 2.\tab}}\pard\plain \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 PRE-RELEASE SOFTWARE. }{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -This software is a pre-release version. It may not work the way a final version of the software will. We may change it for the fin\hich\af45\dbch\af13\loch\f45 al, commercial version. We also may not release a commercial version.}{\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 3.\tab}\hich\af45\dbch\af13\loch\f45 FEEDBACK. }{\rtlch\fcs1 \ab0\af45\afs20 -\ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any p\hich\af45\dbch\af13\loch\f45 -urpose. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement.}{\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\f45\fs20\insrsid3941498\charrsid15278441 \hich\af45\dbch\af0\loch\f45 4.\tab}}\pard \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid3941498 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid3941498\charrsid15278441 DISTRIBUTABLE CODE. }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\b0\fs20\insrsid3941498\charrsid15278441 The software contains code that you are permitted to distribute in applications you develop if you comply with the terms below. (For this Section the term \'93distribution\'94 - also means deployment of your applications for third parties to access over the Internet.)}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid3941498\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s39 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 i.\tab}}\pard\plain \ltrpar\s39\ql \fi-357\li1077\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx1077\wrapdefault\aspalpha\aspnum\faauto\ls7\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid3941498 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Distribution Rights. }{\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 \hich\f45 The code and text files listed below are \'93\loch\f45 \hich\f45 Distributable Code.\'94}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid3941498\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s51 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\lang1036\langfe1033\loch\af3\hich\af3\dbch\af11\langnp1036\insrsid3941498\charrsid15278441 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \ltrpar -\s51\ql \fi-360\li1080\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls12\adjustright\rin0\lin1080\itap0\pararsid3941498 \rtlch\fcs1 \af0\afs21\alang1025 \ltrch\fcs0 \f37\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\ul\lang1036\langfe1033\loch\af45\hich\af45\dbch\af11\langnp1036\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 REDIST.TXT Files}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\lang1036\langfe1033\loch\af45\hich\af45\dbch\af11\langnp1036\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 -. You may copy and distribute the object code form of code listed in REDIST.TXT files, and/or any files listed on the REDIST list located follow\hich\af45\dbch\af11\loch\f45 ing this Microsoft Software License Terms. -\par {\listtext\pard\plain\ltrpar \s49 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\lang1036\langfe1033\loch\af3\hich\af3\dbch\af11\langnp1036\insrsid3941498\charrsid15278441 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}\pard\plain \ltrpar -\s49\ql \fi-360\li1080\ri0\sb120\sa120\nowidctlpar\jclisttab\tx1080\jclisttab\tx1170\wrapdefault\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1080\itap0\pararsid3941498 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\ul\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\lang1036\langfe1033\langnp1036\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 Sample Code and Template}{ -\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\ulnone\lang1036\langfe1033\langnp1036\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 . You may co}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\ulnone\insrsid3941498\charrsid15278441 -\hich\af45\dbch\af11\loch\f45 \hich\f45 py, modify and distribute the source and object code form of code marked as \'93\loch\f45 \hich\f45 sample\'94\loch\f45 \hich\f45 and \'93\loch\f45 \hich\f45 template\'94\loch\f45 . }{\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \fs20\ulnone\dbch\af13\insrsid3941498\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s40 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid3941498\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}}\pard\plain \ltrpar\s40\ql \fi-360\li1080\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx720\jclisttab\tx1170\wrapdefault\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1080\itap0\pararsid3941498 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\ul\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 -{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Third Party Distribution}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\ulnone\dbch\af13\insrsid3941498\charrsid15278441 -\hich\af45\dbch\af13\loch\f45 . }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\ulnone\insrsid3941498\charrsid15278441 \hich\af45\dbch\af11\loch\f45 You may permit di\hich\af45\dbch\af11\loch\f45 -stributors of your applications to copy and distribute the Distributable Code as part of those applications. -\par {\listtext\pard\plain\ltrpar \s39 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 ii.\tab}}\pard\plain \ltrpar\s39\ql \fi-357\li1077\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx1077\wrapdefault\aspalpha\aspnum\faauto\ls7\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid3941498 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Distribution Requirements.}{\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \cs42\fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \cs42\b0\fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -For any Distributable Code you distribute, you must}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s37 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid3941498\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}}\pard\plain \ltrpar\s37\ql \fi-358\li1168\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx1170\wrapdefault\aspalpha\aspnum\faauto\ls5\adjustright\rin0\lin1168\itap0\pararsid3941498 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 -\af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 add significant primary functionality to it in your applicatio\hich\af45\dbch\af13\loch\f45 ns; -\par {\listtext\pard\plain\ltrpar \s37 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af11\insrsid3941498\charrsid15278441 \loch\af3\dbch\af11\hich\f3 \'b7\tab}}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid3941498\charrsid15278441 -\hich\af45\dbch\af11\loch\f45 distribute Distributable Code included in a setup program only as part of that setup program without modification;}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s37 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid3941498\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}\hich\af45\dbch\af13\loch\f45 -require distributors and external end users to agree to terms that protect the Distributable Code at least as much as this agreement;\hich\af45\dbch\af13\loch\f45 and, -\par {\listtext\pard\plain\ltrpar \s37 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid3941498\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}\hich\af45\dbch\af13\loch\f45 -indemnify, defend, and hold harmless Microsoft from any claims, including attorneys\hich\f45 \rquote \loch\f45 fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the Distributable Code. - -\par {\listtext\pard\plain\ltrpar \s39 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\loch\af45\hich\af45\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 iii.\tab}}\pard\plain \ltrpar\s39\ql \fi-357\li1077\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx1077\wrapdefault\aspalpha\aspnum\faauto\ls7\ilvl2\outlinelevel2\adjustright\rin0\lin1077\itap0\pararsid3941498 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 -\b\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Distribution Res\hich\af45\dbch\af13\loch\f45 -trictions.}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid3941498\charrsid15278441 \hich\af45\dbch\af13\loch\f45 You may not use Microsoft\hich\f45 \rquote \loch\f45 s trademarks in your applications\hich\f45 \rquote \loch\f45 - names or branding in a way that suggests your applications come from or are endorsed by Microsoft; or modify or distribute the source code of any Distributable Code so that any part of\hich\af45\dbch\af13\loch\f45 - it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that (i) the code be disclosed or distributed in source code form; or (ii) others have the right to modify it. - -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 5.\tab}}\pard\plain \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid15804309 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Scope of License}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 .}{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 -\b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 - The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as -\hich\af45\dbch\af13\loch\f45 expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s26 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid4934124\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}}\pard\plain \ltrpar\s26\ql \fi-363\li720\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0\pararsid4934124 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 \fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 -\af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 work around any technical limitations in the software}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid4934124\charrsid15278441 -\hich\af45\dbch\af11\loch\f45 ;}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s26 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid4934124\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}\hich\af45\dbch\af13\loch\f45 reverse engineer, decom -\hich\af45\dbch\af13\loch\f45 pile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid4934124\charrsid15278441 -\hich\af45\dbch\af11\loch\f45 ;}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s26 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid2434661\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}}\pard \ltrpar\s26\ql \fi-363\li720\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx720\wrapdefault\aspalpha\aspnum\faauto\ls2\adjustright\rin0\lin720\itap0\pararsid2434661 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid2434661\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -remove, minimize, block or modify any notices of Microsoft or its suppliers in the software; -\par {\listtext\pard\plain\ltrpar \s26 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid2434661\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}\hich\af45\dbch\af13\loch\f45 use the software in any way th -\hich\af45\dbch\af13\loch\f45 at is against the law; or -\par {\listtext\pard\plain\ltrpar \s26 \rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\loch\af3\hich\af3\dbch\af13\insrsid2434661\charrsid15278441 \loch\af3\dbch\af13\hich\f3 \'b7\tab}\hich\af45\dbch\af13\loch\f45 -share, publish or lend the software, or provide the software as a stand-alone hosted as solution for others to use, or transfer the software or this agreement to any third party. -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 6.\tab}}\pard\plain \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid4934124 \rtlch\fcs1 \ab\af45\afs19\alang1025 \ltrch\fcs0 \b\f45\fs19\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 -\ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Export Restrictions}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 .}{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 -\b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid528777\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Microsoft}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid528777\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid528777\charrsid15278441 \hich\af45\dbch\af13\loch\f45 software, onlin\hich\af45\dbch\af13\loch\f45 -e services, professional services and related technology are subject to U.S. export jurisdiction. You must comply with all applicable international and national laws, including the U.S. Export Administration Regulations, the International Traffic in Arms -\hich\af45\dbch\af13\loch\f45 R\hich\af45\dbch\af13\loch\f45 -egulations, Office of Foreign Assets Control sanctions programs, and end-user, end use and destination restrictions by the U.S. and other governments related to Microsoft products, services and technologies. For additional information, see } -{\field\fldedit{\*\fldinst {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3630040 HYPERLINK "http://www.microsoft.com/exporting" }{\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid16594836 {\*\datafield -00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5e00000068007400740070003a002f002f007700770077002e006d006900630072006f0073006f00660074002e0063006f006d002f006500780070006f007200740069006e0067000000795881f43b1d7f48af2c825d -c485276300000000a5ab000300}}}{\fldrslt {\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \cs24\b0\fs20\ul\cf2\dbch\af13\insrsid528777\charrsid16388644 \hich\af45\dbch\af13\loch\f45 www.microsoft.com/exporting}}}\sectd \ltrsect -\linex0\endnhere\sectlinegrid360\sectdefaultcl\sectrsid9860928\sftnbj {\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid528777\charrsid16388644 .}{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid528777\charrsid15278441 -\hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \cs24\fs20\ul\cf2\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 7.\tab}}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 SUPPORT SERVICES.}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \ab0\af45\afs20 -\ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 \hich\f45 Because this software is \'93\loch\f45 \hich\f45 as is,\'94\loch\f45 we may not prov\hich\af45\dbch\af13\loch\f45 ide support services for it.}{ -\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 8.\tab}}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Entire Agreement.}{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 - This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services. -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 9.\tab}}\pard \ltrpar\s1\ql \fi-360\li360\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin360\itap0\pararsid528777 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Applicable Law}{ -\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 .}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid528777\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\b0\fs20\insrsid528777\charrsid15278441 If you -acquired the software in the United States, Washington law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its law -s apply.}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid528777\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 10.\tab}}\pard \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\nowidctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid4934124 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Legal Effect.}{ -\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \ab0\af45\afs20 \ltrch\fcs0 \b0\fs20\dbch\af13\insrsid528777\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -This agreement describes certain legal rights. You may have other rights under the laws of your state or country. This agreement does not change your rights under the laws of your state or country if the laws of your state or coun -\hich\af45\dbch\af13\loch\f45 try do not permit it to do so. }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \b0\fs20\insrsid528777\charrsid15278441 Without limitation of the foregoing, for Australia, }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\insrsid528777\charrsid15278441 YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 - -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 11.\tab}\hich\af45\dbch\af13\loch\f45 Disclaimer of Warranty.}{\rtlch\fcs1 -\af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 DISCLAIMER OF WAR -\hich\af45\dbch\af13\loch\f45 \hich\f45 RANTY. THE SOFTWARE IS LICENSED \'93\loch\f45 \hich\f45 AS-IS.\'94\loch\f45 - YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS F\hich\af45\dbch\af13\loch\f45 O -\hich\af45\dbch\af13\loch\f45 R A PARTICULAR PURPOSE AND NON-INFRINGEMENT. }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 -\par {\listtext\pard\plain\ltrpar \s1 \rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\caps\fs20\loch\af45\hich\af45\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 12.\tab}}\pard \ltrpar\s1\ql \fi-357\li357\ri0\sb120\sa120\widctlpar -\jclisttab\tx360\wrapdefault\aspalpha\aspnum\faauto\ls1\outlinelevel0\adjustright\rin0\lin357\itap0\pararsid12584315 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \caps\fs20\dbch\af13\insrsid4934124\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -Limitation on and Exclusion of Remedies and Damages. }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 LIMITATION ON AND EXCLUSION OF DAMAGES}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\insrsid12584315\charrsid15278441 . YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES. -\par }\pard\plain \ltrpar\s25\ql \li357\ri0\sb120\sa120\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin357\itap0\pararsid12584315 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 This limitation applies to (a) anything related t -\hich\af45\dbch\af13\loch\f45 -o the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent per -\hich\af45\dbch\af13\loch\f45 m\hich\af45\dbch\af13\loch\f45 itted by applicable law. -\par }\pard\plain \ltrpar\ql \li360\ri0\sb120\sa120\nowidctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin360\itap0\pararsid12584315 \rtlch\fcs1 \af45\afs19\alang1025 \ltrch\fcs0 -\fs19\lang1033\langfe1033\loch\af45\hich\af45\dbch\af11\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, -\hich\af45\dbch\af13\loch\f45 consequential or other damages. -\par }\pard \ltrpar\ql \li0\ri0\sb40\sa40\widctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0\pararsid12584315 {\rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French. -\par \hich\af45\dbch\af13\loch\f45 \hich\f45 Remarque : Ce logiciel \'e9\loch\f45 \hich\f45 tant distribu\'e9\loch\f45 \hich\f45 au Qu\'e9\loch\f45 bec, Canada, certaines des clauses dans ce cont\hich\af45\dbch\af13\loch\f45 \hich\f45 -rat sont fournies ci-dessous en fran\'e7\loch\f45 ais. -\par \hich\af45\dbch\af13\loch\f45 \hich\f45 EXON\'c9\loch\f45 RATION DE GARANTIE.}{\rtlch\fcs1 \af43\afs20 \ltrch\fcs0 \f43\fs20\cf1\lang1036\langfe1033\langnp1036\insrsid12584315\charrsid15278441 \~}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 -\fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 \hich\f45 Le logiciel vis\'e9\loch\f45 \hich\f45 par une licence est offert \'ab\loch\f45 \hich\f45 tel quel \'bb\loch\f45 \hich\f45 . Toute utilisation de ce logiciel est -\'e0\loch\f45 \hich\f45 votre seule risque et p\'e9\loch\f45 ril. Microsoft n\hich\f45 \rquote \loch\f45 accorde aucune autre garantie expresse. Vous pouvez\hich\af45\dbch\af13\loch\f45 \hich\f45 b\'e9\loch\f45 \hich\f45 n\'e9\loch\f45 \hich\f45 -ficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualit\'e9\loch\f45 marchande, d\hich\f45 \rquote -\loch\f45 \hich\f45 ad\'e9\loch\f45 \hich\f45 quation \'e0\loch\f45 un usage particul\hich\af45\dbch\af13\loch\f45 i\hich\af45\dbch\af13\loch\f45 er et d\hich\f45 \rquote \loch\f45 \hich\f45 absence de contrefa\'e7\loch\f45 on sont exclues. -\par }{\rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 \hich\f45 LIMITATION DES DOMMAGES-INT\'c9\loch\f45 \hich\f45 R\'ca\loch\f45 \hich\f45 TS ET EXCLUSION DE RESPONSABILIT\'c9\loch\f45 - POUR LES DOMMAGES.}{\rtlch\fcs1 \af43\afs20 \ltrch\fcs0 \f43\fs20\cf1\lang1036\langfe1033\langnp1036\insrsid12584315\charrsid15278441 \~}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 -Vous pouvez}{\rtlch\fcs1 \af43\afs20 \ltrch\fcs0 \f43\fs20\cf1\lang1036\langfe1033\langnp1036\insrsid12584315\charrsid15278441 \hich\af43\dbch\af11\loch\f43 }{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 -\hich\af45\dbch\af13\loch\f45 \hich\f45 obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement \'e0\loch\f45 hauteur de 5,0\hich\af45\dbch\af13\loch\f45 \hich\f45 0 $ US. Vous ne pouvez pr\'e9\loch\f45 -\hich\f45 tendre \'e0\loch\f45 \hich\f45 aucune indemnisation pour les autres dommages, y compris les dommages sp\'e9\loch\f45 \hich\f45 ciaux, indirects ou accessoires et pertes de b\'e9\loch\f45 \hich\f45 n\'e9\loch\f45 fices. -\par \hich\af45\dbch\af13\loch\f45 Cette limitation concerne: -\par }\pard \ltrpar\ql \fi-363\li363\ri0\sb40\sa40\widctlpar\wrapdefault\faauto\adjustright\rin0\lin363\itap0\pararsid12584315 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \loch\af45\dbch\af13\hich\f45 \'b7\~\~\~\~\tab -\loch\f45 \hich\f45 tout ce qui est reli\'e9\hich\af45\dbch\af13\loch\f45 au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et -\par \loch\af45\dbch\af13\hich\f45 \'b7\~\~\~\~\~\loch\f45 \hich\f45 les r\'e9\loch\f45 \hich\f45 clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9\loch\f45 \hich\f45 stricte, de n\'e9\loch\f45 gligenc -\hich\af45\dbch\af13\loch\f45 e ou d\hich\f45 \rquote \loch\f45 \hich\f45 une autre faute dans la limite autoris\'e9\loch\f45 e par la loi en vigueur. -\par }\pard \ltrpar\ql \li0\ri0\sb40\sa40\widctlpar\wrapdefault\faauto\adjustright\rin0\lin0\itap0\pararsid12584315 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 Elle s\hich\f45 \rquote -\loch\f45 \hich\f45 applique \'e9\loch\f45 \hich\f45 galement, m\'ea\loch\f45 \hich\f45 me si Microsoft connaissait ou devrait conna\'ee\loch\f45 tre l\hich\f45 \rquote \'e9\loch\f45 \hich\f45 ventualit\'e9\loch\f45 d\hich\f45 \rquote \loch\f45 -un tel dommage. Si votre pays n\hich\f45 \rquote \loch\f45 autorise pas l\hich\f45 \rquote \loch\f45 \hich\f45 exclusion ou la limitation de responsabilit\'e9\hich\af45\dbch\af13\loch\f45 - pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l\hich\f45 \rquote \loch\f45 exclusion ci-dessus ne s\hich\f45 \rquote \loch\f45 \hich\f45 appliquera pas \'e0\loch\f45 \hich\f45 votre \'e9 -\loch\f45 gard. -\par }{\rtlch\fcs1 \ab\af45\afs20 \ltrch\fcs0 \b\fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 EFFET JURIDIQUE.}{\rtlch\fcs1 \af43\afs20 \ltrch\fcs0 \f43\fs20\cf1\lang1036\langfe1033\langnp1036\insrsid12584315\charrsid15278441 -\~}{\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\dbch\af13\insrsid12584315\charrsid15278441 \hich\af45\dbch\af13\loch\f45 \hich\f45 Le pr\'e9\loch\f45 \hich\f45 sent contrat d\'e9\loch\f45 crit certains droits juridiques. Vous pourriez avoir -\hich\af45\dbch\af13\loch\f45 d\hich\f45 \rquote \loch\f45 \hich\f45 autres droits pr\'e9\loch\f45 \hich\f45 vus par les lois de votre pays. Le pr\'e9\loch\f45 \hich\f45 sent contrat ne modifie pas les droits que vous conf\'e8\loch\f45 -rent les lois de votre pays si celles-ci ne le permettent pas. -\par }\pard \ltrpar\ql \li0\ri0\sb120\sa120\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\rtlch\fcs1 \af45\afs20 \ltrch\fcs0 \fs20\insrsid9860928\charrsid15278441 -\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a -9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad -5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 -b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 -0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 -a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f -c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 -0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 -a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 -6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b -4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b -4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210096b5ade296060000501b0000160000007468656d652f7468656d652f -7468656d65312e786d6cec594f6fdb3614bf0fd87720746f6327761a07758ad8b19b2d4d1bc46e871e698996d850a240d2497d1bdae38001c3ba618715d86d87 -615b8116d8a5fb34d93a6c1dd0afb0475292c5585e9236d88aad3e2412f9e3fbff1e1fa9abd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad -79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607d22d771db8b944ad79796a40fc3585ee62949606ecc458c15bc8a702910f808e8c66c69b9565b -5d8a314d3c94e018c8de1a8fa94fd05093f43672e23d06af89927ac06762a049136785c10607758d9053d965021d62d6f6804fc08f86e4bef210c352c144dbab -999fb7b4717509af678b985ab0b6b4ae6f7ed9ba6c4170b06c788a705430adf71bad2b5b057d03606a1ed7ebf5babd7a41cf00b0ef83a6569632cd467faddec9 -699640f6719e76b7d6ac355c7c89feca9cccad4ea7d36c65b258a206641f1b73f8b5da6a6373d9c11b90c537e7f08dce66b7bbeae00dc8e257e7f0fd2badd586 -8b37a088d1e4600ead1ddaef67d40bc898b3ed4af81ac0d76a197c86826828a24bb318f3442d8ab518dfe3a20f000d6458d104a9694ac6d88728eee2782428d6 -0cf03ac1a5193be4cbb921cd0b495fd054b5bd0f530c1931a3f7eaf9f7af9e3f45c70f9e1d3ff8e9f8e1c3e3073f5a42ceaa6d9c84e5552fbffdeccfc71fa33f -9e7ef3f2d117d57859c6fffac327bffcfc793510d26726ce8b2f9ffcf6ecc98baf3efdfdbb4715f04d814765f890c644a29be408edf3181433567125272371be -15c308d3f28acd249438c19a4b05fd9e8a1cf4cd296699771c393ac4b5e01d01e5a30a787d72cf1178108989a2159c77a2d801ee72ce3a5c545a6147f32a9979 -3849c26ae66252c6ed637c58c5bb8b13c7bfbd490a75330f4b47f16e441c31f7184e140e494214d273fc80900aedee52ead87597fa824b3e56e82e451d4c2b4d -32a423279a668bb6690c7e9956e90cfe766cb37b077538abd27a8b1cba48c80acc2a841f12e698f13a9e281c57911ce298950d7e03aba84ac8c154f8655c4f2a -f074481847bd804859b5e696007d4b4edfc150b12addbecba6b18b148a1e54d1bc81392f23b7f84137c2715a851dd0242a633f900710a218ed715505dfe56e86 -e877f0034e16bafb0e258ebb4faf06b769e888340b103d3311da9750aa9d0a1cd3e4efca31a3508f6d0c5c5c398602f8e2ebc71591f5b616e24dd893aa3261fb -44f95d843b5974bb5c04f4edafb95b7892ec1108f3f98de75dc97d5772bdff7cc95d94cf672db4b3da0a6557f70db629362d72bcb0431e53c6066acac80d699a -6409fb44d08741bdce9c0e4971624a2378cceaba830b05366b90e0ea23aaa241845368b0eb9e2612ca8c742851ca251ceccc70256d8d87265dd96361531f186c -3d9058edf2c00eafe8e1fc5c509031bb4d680e9f39a3154de0accc56ae644441edd76156d7429d995bdd88664a9dc3ad50197c38af1a0c16d684060441db0256 -5e85f3b9660d0713cc48a0ed6ef7dedc2dc60b17e92219e180643ed27acffba86e9c94c78ab90980d8a9f0913ee49d62b512b79626fb06dccee2a432bbc60276 -b9f7dec44b7904cfbca4f3f6443ab2a49c9c2c41476dafd55c6e7ac8c769db1bc399161ee314bc2e75cf8759081743be1236ec4f4d6693e5336fb672c5dc24a8 -c33585b5fb9cc24e1d4885545b58463634cc5416022cd19cacfccb4d30eb45296023fd35a458598360f8d7a4003bbaae25e331f155d9d9a5116d3bfb9a95523e -51440ca2e0088dd844ec6370bf0e55d027a012ae264c45d02f708fa6ad6da6dce29c255df9f6cae0ec38666984b372ab5334cf640b37795cc860de4ae2816e95 -b21be5ceaf8a49f90b52a51cc6ff3355f47e0237052b81f6800fd7b802239daf6d8f0b1571a8426944fdbe80c6c1d40e8816b88b8569082ab84c36ff0539d4ff -6dce591a26ade1c0a7f669880485fd484582903d284b26fa4e2156cff62e4b9265844c4495c495a9157b440e091bea1ab8aaf7760f4510eaa69a6465c0e04ec6 -9ffb9e65d028d44d4e39df9c1a52ecbd3607fee9cec7263328e5d661d3d0e4f62f44acd855ed7ab33cdf7bcb8ae889599bd5c8b3029895b6825696f6af29c239 -b75a5bb1e6345e6ee6c28117e73586c1a2214ae1be07e93fb0ff51e133fb65426fa843be0fb515c187064d0cc206a2fa926d3c902e907670048d931db4c1a449 -59d366ad93b65abe595f70a75bf03d616c2dd959fc7d4e6317cd99cbcec9c58b34766661c7d6766ca1a9c1b327531486c6f941c638c67cd22a7f75e2a37be0e8 -2db8df9f30254d30c1372581a1f51c983c80e4b71ccdd28dbf000000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468 -656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4 -350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d2624 -52282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe5141 -73d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000 -0000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000 -000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019 -0200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d001400060008000000210096b5ade296060000501b00001600000000 -000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027 -00000000000000000000000000a00900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d0100009b0a00000000} -{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d -617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 -6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 -656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} -{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdlocked0 heading 1; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 4; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 7; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature; -\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority59 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; -\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1; -\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading; -\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph; -\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; -\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1; -\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2; -\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; -\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3; -\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3; -\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3; -\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4; -\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; -\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5; -\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6; -\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6; -\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6; -\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; -\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography; -\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4; -\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2; -\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3; -\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4; -\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4; -\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5; -\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5; -\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6; -\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6; -\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3; -\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3; -\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4; -\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4; -\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5; -\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5; -\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6; -\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention; -\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore 01050000 -02000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 -d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000606f -21ca73f5d401feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/FxCopAnalyzersPackage.cs b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/FxCopAnalyzersPackage.cs deleted file mode 100644 index 1b49b0b3c7..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/FxCopAnalyzersPackage.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Runtime.InteropServices; -using Microsoft.VisualStudio.Shell; - -namespace FxCopAnalyzersSetup -{ - // Avoid uninstantiated internal classes - // Package is used by VS -#pragma warning disable CA1812 - [Guid(PackageGuid)] - internal class FxCopAnalyzersPackage : Package - { - private const string PackageGuid = "4A41D270-A97F-4639-A352-28732FC410E4"; - } -} diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.png b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.png deleted file mode 100644 index 916734f9d6..0000000000 Binary files a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.png and /dev/null differ diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.svg b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.svg deleted file mode 100644 index 2377b9bd49..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Icons/MsCodeAnalysisAnalyzer_72x.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Microsoft.CodeAnalysis.FxCopAnalyzers.Setup.csproj b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Microsoft.CodeAnalysis.FxCopAnalyzers.Setup.csproj deleted file mode 100644 index 62ffd98c71..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Microsoft.CodeAnalysis.FxCopAnalyzers.Setup.csproj +++ /dev/null @@ -1,61 +0,0 @@ - - - - net472 - true - false - false - false - true - true - false - true - - - - PreserveNewest - true - - - PreserveNewest - true - - - PreserveNewest - true - - - PreserveNewest - true - - - - - - - - Microsoft.CodeQuality.Analyzers.Setup - Vsixes - false - VSIXContainerProjectOutputGroup - - - Microsoft.NetFramework.Analyzers.Setup - Vsixes - false - VSIXContainerProjectOutputGroup - - - Microsoft.NetCore.Analyzers.Setup - Vsixes - false - VSIXContainerProjectOutputGroup - - - - - PreserveNewest - true - - - diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Properties/launchSettings.json b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Properties/launchSettings.json deleted file mode 100644 index 1830408569..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Visual Studio Extension": { - "executablePath": "$(DevEnvDir)devenv.exe", - "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" - } - } -} diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/ReleaseNotes.txt b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/ReleaseNotes.txt deleted file mode 100644 index 07cb5551d4..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/ReleaseNotes.txt +++ /dev/null @@ -1,2 +0,0 @@ -May 2019: v3.0.0 Official Release -Requires Visual Studio 2019 RTW or later. diff --git a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/source.extension.vsixmanifest b/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/source.extension.vsixmanifest deleted file mode 100644 index e45b9cc42b..0000000000 --- a/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Setup/source.extension.vsixmanifest +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - Microsoft Code Analysis 2019 - Live code analysis rules and code fixes addressing API design, performance, security, and best practices for C# and Visual Basic. - https://docs.microsoft.com/en-us/visualstudio/code-quality/install-fxcop-analyzers?view=vs-2019#to-install-fxcop-analyzers-as-a-vsix - EULA.rtf - ReleaseNotes.txt - Icons\MsCodeAnalysisAnalyzer_72x.png - code analysis; roslyn; analyzer; analyzers; live; fxcop; code quality; - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.csproj b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.csproj deleted file mode 100644 index 00a976f959..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.csproj +++ /dev/null @@ -1,33 +0,0 @@ - - - - netstandard2.0 - - *$(MSBuildProjectFile)* - 2.0.0 - true - - - - - - portable-net45+win8 - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.md b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.md deleted file mode 100644 index caa73d45ee..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.md +++ /dev/null @@ -1,13 +0,0 @@ -# Microsoft.CodeAnalysis.VersionCheckAnalyzer - -## CA9999: Analyzer version mismatch - -Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.sarif b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.sarif deleted file mode 100644 index e44482e584..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/Microsoft.CodeAnalysis.VersionCheckAnalyzer.sarif +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/sarif-1.0.0", - "version": "1.0.0", - "runs": [ - { - "tool": { - "name": "Microsoft.CodeAnalysis.VersionCheckAnalyzer", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA9999": { - "id": "CA9999", - "shortDescription": "Analyzer version mismatch", - "fullDescription": "Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version.", - "defaultLevel": "warning", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "AnalyzerVersionCheckAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.resx b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.resx deleted file mode 100644 index 314051508b..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - - - Analyzer version mismatch - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/RulesMissingDocumentation.md b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/RulesMissingDocumentation.md deleted file mode 100644 index 1e4217990d..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/RulesMissingDocumentation.md +++ /dev/null @@ -1,5 +0,0 @@ -# Rules without documentation - -Rule ID | Missing Help Link | Title | ---------|-------------------|-------| -CA9999 | | Analyzer version mismatch | diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/VersionCheckAnalyzer.cs b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/VersionCheckAnalyzer.cs deleted file mode 100644 index c4d0ea7958..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/VersionCheckAnalyzer.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Immutable; -using System.Reflection; -using Analyzer.Utilities; -using Analyzer.Utilities.Extensions; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Diagnostics; - -namespace Microsoft.CodeAnalysis.VersionCheckAnalyzer -{ - [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] - public sealed class AnalyzerVersionCheckAnalyzer : DiagnosticAnalyzer - { - private const string RuleId = "CA9999"; - - // TODO: Below version must be autogenerated using the project properties. - private const string RequiredMicrosoftCodeAnalysisVersion = "3.3.1"; - - private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources.VersionCheckTitle), MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ResourceManager, typeof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources)); - private static readonly LocalizableString s_localizableMessageFormat = new LocalizableResourceString(nameof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources.VersionCheckMessage), MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ResourceManager, typeof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources)); - private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources.VersionCheckDescription), MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ResourceManager, typeof(MicrosoftCodeAnalysisVersionCheckAnalyzerResources)); - - public static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor( - RuleId, - s_localizableTitle, - s_localizableMessageFormat, - DiagnosticCategory.Reliability, - DiagnosticSeverity.Warning, - isEnabledByDefault: true, - description: s_localizableDescription); - - private static readonly Version s_MicrosoftCodeAnalysisMinVersion = new Version(RequiredMicrosoftCodeAnalysisVersion); - private static readonly Version s_MicrosoftCodeAnalysisDogfoodVersion = new Version("42.42"); - private static readonly Version s_MicrosoftCodeAnalysisVersion = typeof(AnalysisContext).GetTypeInfo().Assembly.GetName().Version; - - // Analyzers will only execute fine if we are either using dogfood bits of Microsoft.CodeAnalysis or its version is >= s_MicrosoftCodeAnalysisMinVersion - private static bool ShouldExecuteAnalyzers => - s_MicrosoftCodeAnalysisVersion >= s_MicrosoftCodeAnalysisDogfoodVersion || - s_MicrosoftCodeAnalysisVersion >= s_MicrosoftCodeAnalysisMinVersion; - - public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); - - public override void Initialize(AnalysisContext context) - { - context.EnableConcurrentExecution(); - context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); - - // Suppress RS1013 as CompilationAction is only executed with FSA on and we want the analyzer to run even with FSA off. -#pragma warning disable RS1013 // Start action has no registered non-end actions. - context.RegisterCompilationStartAction(compilationStartContext => -#pragma warning restore RS1013 // Start action has no registered non-end actions. - { - compilationStartContext.RegisterCompilationEndAction(compilationContext => - { - if (!ShouldExecuteAnalyzers) - { - // Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. - var arg1 = RequiredMicrosoftCodeAnalysisVersion; - var arg2 = s_MicrosoftCodeAnalysisVersion; - compilationContext.ReportNoLocationDiagnostic(Rule, arg1, arg2); - } - }); - }); - } - } -} diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.cs.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.cs.xlf deleted file mode 100644 index 07481e114e..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.cs.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Analyzátory v tomto balíčku vyžadují určitou minimální verzi Microsoft.CodeAnalysis, aby se daly správně spouštět. Přečtěte si informace na stránce https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions, abyste si mohli nainstalovat správnou verzi analyzátoru. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Neshoda verzí mezi balíčkem analyzátoru {0} a Microsoft.CodeAnalysis {1}. Některé analyzátory z tohoto balíčku se nespustí, dokud se neshoda verzí nevyřeší. Přečtěte si informace na stránce https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions, abyste si mohli nainstalovat správnou verzi analyzátoru. - - - - Analyzer version mismatch - Neshoda verzí analyzátoru - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.de.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.de.xlf deleted file mode 100644 index 9db015215a..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.de.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Damit Analysetools in diesem Paket ordnungsgemäß ausgeführt werden können, ist eine bestimmte Mindestversion von Microsoft.CodeAnalysis erforderlich. Besuchen Sie https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions, um die richtige Analysetoolversion zu installieren. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Versionskonflikt zwischen dem Analysetoolpaket "{0}" und Microsoft.CodeAnalysis "{1}". Bestimmte Analysetools in diesem Paket werden erst ausgeführt, wenn der Versionskonflikt behoben ist. Besuchen Sie https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions, um die richtige Analysetoolversion zu installieren. - - - - Analyzer version mismatch - Konflikt bei der Analysetoolversion - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.es.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.es.xlf deleted file mode 100644 index d7546070d7..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.es.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Los analizadores de este paquete requieren una versión mínima determinada de Microsoft.CodeAnalysis para ejecutarse correctamente. Consulte https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions para instalar la versión correcta del analizador. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Incoherencia de versiones entre el paquete de analizadores "{0}" y Microsoft.CodeAnalysis "{1}". Algunos analizadores de este paquete no se ejecutarán hasta que no se corrija la discrepancia de versiones. Consulte https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions para instalar la versión correcta del analizador. - - - - Analyzer version mismatch - Las versiones del analizador no coinciden - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.fr.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.fr.xlf deleted file mode 100644 index 6c86266b54..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.fr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Les analyseurs de ce package nécessitent une certaine version minimale de Microsoft.CodeAnalysis pour pouvoir s'exécuter correctement. Consultez https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions pour installer la version appropriée de l'analyseur. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Incompatibilité de version entre le package de l'analyseur '{0}' et Microsoft.CodeAnalysis '{1}'. Certains analyseurs de ce package ne peuvent pas s'exécuter tant que l'incompatibilité de version n'est pas corrigée. Consultez https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions pour installer la version appropriée de l'analyseur. - - - - Analyzer version mismatch - Incompatibilité de version de l'analyseur - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.it.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.it.xlf deleted file mode 100644 index 823fa0b8a5..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.it.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Per la corretta esecuzione degli analizzatori in questo pacchetto è richiesta una versione minima specifica di Microsoft.CodeAnalysis. Per installare la versione corretta dell'analizzatore, vedere https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - La versione del pacchetto '{0}' dell'analizzatore non corrisponde a quella '{1}' di Microsoft.CodeAnalysis. Alcuni analizzatori inclusi in questo pacchetto non verranno eseguiti finché non si imposta una versione corrispondente. Per installare la versione corretta dell'analizzatore, vedere https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions. - - - - Analyzer version mismatch - Versione dell'analizzatore non corrispondente - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ja.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ja.xlf deleted file mode 100644 index 7aa782bfa5..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ja.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - このパッケージのアナライザーを正しく実行するには、特定のバージョン以上の Microsoft.CodeAnalysis が必要です。正しいアナライザー バージョンをインストールするには、https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versionsを参照してください。 - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - アナライザー パッケージ '{0}' と Microsoft.CodeAnalysis '{1}' のバージョンが一致しません。このパッケージの特定のアナライザーは、バージョンの不一致が解決されるまで実行されません。正しいバージョンのアナライザーをインストールするには、https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions を参照してください。 - - - - Analyzer version mismatch - アナライザー バージョンの不一致 - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ko.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ko.xlf deleted file mode 100644 index d21bb63116..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ko.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 이 패키지의 분석기가 제대로 실행되려면 특정 최소 버전의 Microsoft.CodeAnalysis가 필요합니다. https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions를 참조하여 올바른 분석기 버전을 설치하세요. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 분석기 패키지 '{0}' 및 Microsoft.CodeAnalysis '{1}'의 버전이 일치하지 않습니다. 이 패키지의 특정 분석기는 버전 불일치가 수정될 때까지 실행되지 않습니다. https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions를 참조하여 올바른 분석기 버전을 설치하세요. - - - - Analyzer version mismatch - 분석기 버전이 일치하지 않음 - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pl.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pl.xlf deleted file mode 100644 index 34544ffca9..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pl.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Analizatory w tym pakiecie wymagają określonej minimalnej wersji metody Microsoft.CodeAnalysis do poprawnego wykonania. Skorzystaj ze strony https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions w celu zainstalowania prawidłowej wersji analizatorów. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Niezgodność wersji między pakietem analizatorów „{0} i metodą Microsoft.CodeAnalysis „{1}”. Niektóre analizatory w tym pakiecie nie uruchomią się, dopóki niezgodność wersji nie zostanie naprawiona. Skorzystaj ze strony https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions, aby zainstalować prawidłową wersję analizatora. - - - - Analyzer version mismatch - Niezgodność wersji analizatora - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pt-BR.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pt-BR.xlf deleted file mode 100644 index ee3bb661b2..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.pt-BR.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Os analisadores neste pacote exigem uma determinada versão mínima do Microsoft.CodeAnalysis para que sejam executados corretamente. Confira https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions para instalar a versão correta do analisador. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Incompatibilidade de versão entre o pacote do analisador '{0}' e o Microsoft.CodeAnalysis '{1}'. Determinados analisadores neste pacote não serão executados até que a incompatibilidade de versão seja corrigida. Confira https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions para instalar a versão correta do analisador. - - - - Analyzer version mismatch - Incompatibilidade de versão do analisador - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ru.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ru.xlf deleted file mode 100644 index 5e5d533af9..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.ru.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Для правильной работы анализаторам в этом пакете требуется определенная минимальная версия Microsoft.CodeAnalysis. Сведения об установке подходящей версии анализатора см. на странице https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Несоответствие версий между пакетом анализатора "{0}" и Microsoft.CodeAnalysis "{1}". Отдельные анализаторы в этом пакете не будут работать до устранения этого несоответствия. Сведения об установке подходящей версии анализатора см. на странице https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions. - - - - Analyzer version mismatch - Несоответствие версии анализатора - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.tr.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.tr.xlf deleted file mode 100644 index 76d2cfaac5..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.tr.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - Bu paketteki çözümleyicilerin düzgün yürütme yapabilmesi için Microsoft.CodeAnalysis'in belirli bir en düşük sürümü gerekir. Doğru çözümleyici sürümünü yüklemek için https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions adresine başvurun. - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - '{0}' çözümleyici paketi ve Microsoft.CodeAnalysis '{1}' arasında sürüm uyumsuzluğu var. Bu paketteki belirli çözümleyiciler, sürüm uyumsuzluğu düzeltilene kadar çalışmaz. Doğru çözümleyici sürümünü yüklemek için https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions adresine başvurun. - - - - Analyzer version mismatch - Çözümleyici sürümü uyumsuzluğu - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hans.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hans.xlf deleted file mode 100644 index c3fe7acea0..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hans.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 此包中的分析器要求特定最低版本的 Microsoft.CodeAnalysis 才能正确执行。请参阅 https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions 以安装正确的分析器版本。 - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 分析器包“{0}”与 Microsoft.CodeAnalysis“{1}”的版本不匹配。只有先修复版本不匹配问题,此包中的特定分析器才能运行。请参阅 https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions 以安装正确的分析器版本。 - - - - Analyzer version mismatch - 分析器版本不匹配 - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hant.xlf b/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hant.xlf deleted file mode 100644 index b9c30bfbef..0000000000 --- a/src/Microsoft.CodeAnalysis.VersionCheckAnalyzer/xlf/MicrosoftCodeAnalysisVersionCheckAnalyzerResources.zh-Hant.xlf +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - Analyzers in this package require a certain minimum version of Microsoft.CodeAnalysis to execute correctly. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 此套件中的分析器,需要某些最基本的 Microsoft.CodeAnalysis 版本,才可正確執行。請參閱 https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions,安裝正確的分析器版本。 - - - - Version mismatch between the analyzer package '{0}' and Microsoft.CodeAnalysis '{1}'. Certain analyzers in this package will not run until the version mismatch is fixed. Refer to https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions to install the correct analyzer version. - 分析器套件 '{0}' 和 Microsoft.CodeAnalysis '{1}' 的版本不符。修正版本不符之前,將不會執行此套件中的某些分析器。請參閱 https://docs.microsoft.com/visualstudio/code-quality/install-fxcop-analyzers#fxcopanalyzers-package-versions,安裝正確的分析器版本。 - - - - Analyzer version mismatch - 分析器版本不符 - - - - - \ No newline at end of file diff --git a/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.md b/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.md deleted file mode 100644 index d26098b3ca..0000000000 --- a/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.md +++ /dev/null @@ -1,1201 +0,0 @@ -# Microsoft.CodeQuality.Analyzers - -## [CA1000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000): Do not declare static members on generic types - -When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001): Types that own disposable fields should be disposable - -A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002): Do not expose generic lists - -System.Collections.Generic.List\ is a generic collection that's designed for performance and not inheritance. List\ does not contain virtual members that make it easier to change the behavior of an inherited class. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1003](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1003): Use generic event handler instances - -A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1005](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1005): Avoid excessive parameters on generic types - -The more type parameters a generic type contains, the more difficult it is to know and remember what each type parameter represents. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1008): Enums should have zero value - -The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be ""None"" to indicate that no values have been set in the enumeration. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1010](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1010): Generic interface should also be implemented - -To broaden the usability of a type, implement one of the generic interfaces. This is especially true for collections as they can then be used to populate generic collection types. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012): Abstract types should not have public constructors - -Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1014](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1014): Mark assemblies with CLSCompliant - -The Common Language Specification (CLS) defines naming restrictions, data types, and rules to which assemblies must conform if they will be used across programming languages. Good design dictates that all assemblies explicitly indicate CLS compliance by using CLSCompliantAttribute . If this attribute is not present on an assembly, the assembly is not compliant. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1016](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016): Mark assemblies with assembly version - -The .NET Framework uses the version number to uniquely identify an assembly, and to bind to types in strongly named assemblies. The version number is used together with version and publisher policy. By default, applications run only with the assembly version with which they were built. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1017](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1017): Mark assemblies with ComVisible - -ComVisibleAttribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for the whole assembly and then overridden for individual types and type members. If this attribute is not present, the contents of the assembly are visible to COM clients. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1018](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1018): Mark attributes with AttributeUsageAttribute - -Specify AttributeUsage on {0} - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1019](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019): Define accessors for attribute arguments - -Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1} - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1021](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1021): Avoid out parameters - -Passing types by reference (using 'out' or 'ref') requires experience with pointers, understanding how value types and reference types differ, and handling methods with multiple return values. Also, the difference between 'out' and 'ref' parameters is not widely understood. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1024](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1024): Use properties where appropriate - -A public or protected method has a name that starts with ""Get"", takes no parameters, and returns a value that is not an array. The method might be a good candidate to become a property. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1027](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1027): Mark enums with FlagsAttribute - -An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1028](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1028): Enum Storage should be Int32 - -An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1030](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1030): Use events where appropriate - -This rule detects methods that have names that ordinarily would be used for events. If a method is called in response to a clearly defined state change, the method should be invoked by an event handler. Objects that call the method should raise events instead of calling the method directly. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1031](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031): Do not catch general exception types - -A general exception such as System.Exception or System.SystemException or a disallowed exception type is caught in a catch statement, or a general catch clause is used. General and disallowed exceptions should not be caught. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1032](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032): Implement standard exception constructors - -Failure to provide the full set of constructors can make it difficult to correctly handle exceptions. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1033](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033): Interface methods should be callable by child types - -An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1034](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1034): Nested types should not be visible - -A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1036](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1036): Override methods on comparable types - -A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1040](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040): Avoid empty interfaces - -Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members; therefore, it does not define a contract that can be implemented. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1041](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041): Provide ObsoleteAttribute message - -A type or member is marked by using a System.ObsoleteAttribute attribute that does not have its ObsoleteAttribute.Message property specified. When a type or member that is marked by using ObsoleteAttribute is compiled, the Message property of the attribute is displayed. This gives the user information about the obsolete type or member. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1043](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1043): Use Integral Or String Argument For Indexers - -Indexers, that is, indexed properties, should use integer or string types for the index. These types are typically used for indexing data structures and increase the usability of the library. Use of the Object type should be restricted to those cases where the specific integer or string type cannot be specified at design time. If the design requires other types for the index, reconsider whether the type represents a logical data store. If it does not represent a logical data store, use a method. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1044](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1044): Properties should not be write only - -Although it is acceptable and often necessary to have a read-only property, the design guidelines prohibit the use of write-only properties. This is because letting a user set a value, and then preventing the user from viewing that value, does not provide any security. Also, without read access, the state of shared objects cannot be viewed, which limits their usefulness. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1045](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1045): Do not pass types by reference - -Passing types by reference (using out or ref) requires experience with pointers, understanding how value types and reference types differ, and handling methods that have multiple return values. Also, the difference between out and ref parameters is not widely understood. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1046](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1046): Do not overload equality operator on reference types - -For reference types, the default implementation of the equality operator is almost always correct. By default, two references are equal only if they point to the same object. If the operator is providing meaningful value equality, the type should implement the generic 'System.IEquatable' interface. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1047](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1047): Do not declare protected member in sealed type - -Types declare protected members so that inheriting types can access or override the member. By definition, you cannot inherit from a sealed type, which means that protected methods on sealed types cannot be called. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1050](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1050): Declare types in namespaces - -Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1051](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051): Do not declare visible instance fields - -The primary use of a field should be as an implementation detail. Fields should be private or internal and should be exposed by using properties. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1052](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052): Static holder types should be Static or NotInheritable - -Type '{0}' is a static holder type but is neither static nor NotInheritable - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1054](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054): URI-like parameters should not be strings - -This rule assumes that the parameter represents a Uniform Resource Identifier (URI). A string representation or a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. 'System.Uri' class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1055](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1055): URI-like return values should not be strings - -This rule assumes that the method returns a URI. A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1056](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1056): URI-like properties should not be strings - -This rule assumes that the property represents a Uniform Resource Identifier (URI). A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1060](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1060): Move pinvokes to native methods class - -Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1061](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1061): Do not hide base class methods - -A method in a base type is hidden by an identically named method in a derived type when the parameter signature of the derived method differs only by types that are more weakly derived than the corresponding types in the parameter signature of the base method. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1062](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062): Validate arguments of public methods - -An externally visible method dereferences one of its reference arguments without verifying whether that argument is null (Nothing in Visual Basic). All reference arguments that are passed to externally visible methods should be checked against null. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. If the method is designed to be called only by known assemblies, you should make the method internal. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1063](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1063): Implement IDisposable Correctly - -All IDisposable types should implement the Dispose pattern correctly. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1064](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1064): Exceptions should be public - -An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1065](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065): Do not raise exceptions in unexpected locations - -A method that is not expected to throw exceptions throws an exception. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1066](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1066): Implement IEquatable when overriding Object.Equals - -When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable\, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable\.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1067](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067): Override Object.Equals(object) when implementing IEquatable\ - -When a type T implements the interface IEquatable\, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the "principle of least surprise". - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1068](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068): CancellationToken parameters must come last - -Method '{0}' should take CancellationToken as the last parameter - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1069](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1069): Enums values should not be duplicated - -The field reference '{0}' is duplicated in this bitwise initialization - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1070](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1070): Do not declare event fields as virtual - -Do not declare virtual events in a base class. Overridden events in a derived class have undefined behavior. The C# compiler does not handle this correctly and it is unpredictable whether a subscriber to the derived event will actually be subscribing to the base class event. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1200](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200): Avoid using cref tags with a prefix - -Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax. - -|Item|Value| -|-|-| -|Category|Documentation| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1501](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1501): Avoid excessive inheritance - -Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1502](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1502): Avoid excessive complexity - -Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1505](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505): Avoid unmaintainable code - -The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1506](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1506): Avoid excessive class coupling - -This rule measures class coupling by counting the number of unique type references that a symbol contains. Symbols that have a high degree of class coupling can be difficult to maintain. It is a good practice to have types and methods that exhibit low coupling and high cohesion. To fix this violation, try to redesign the code to reduce the number of types to which it is coupled. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1507](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507): Use nameof to express symbol names - -Using nameof helps keep your code valid when refactoring. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1508](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508): Avoid dead conditional code - -'{0}' is never '{1}'. Remove or refactor the condition(s) to avoid dead code. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1509](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1509): Invalid entry in code metrics rule specification file - -Invalid entry in code metrics rule specification file. - -|Item|Value| -|-|-| -|Category|Maintainability| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1700](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700): Do not name enum values 'Reserved' - -This rule assumes that an enumeration member that has a name that contains "reserved" is not currently used but is a placeholder to be renamed or removed in a future version. Renaming or removing a member is a breaking change. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1707](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707): Identifiers should not contain underscores - -By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1708](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1708): Identifiers should differ by more than case - -Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1710](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710): Identifiers should have correct suffix - -By convention, the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, have a suffix that is associated with the base type or interface. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1711](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711): Identifiers should not have incorrect suffix - -By convention, only the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, should end with specific reserved suffixes. Other type names should not use these reserved suffixes. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1712](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712): Do not prefix enum values with type name - -An enumeration's values should not start with the type name of the enumeration. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1713](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1713): Events should not have 'Before' or 'After' prefix - -Event names should describe the action that raises the event. To name related events that are raised in a specific sequence, use the present or past tense to indicate the relative position in the sequence of actions. For example, when naming a pair of events that is raised when closing a resource, you might name it 'Closing' and 'Closed', instead of 'BeforeClose' and 'AfterClose'. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1714](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714): Flags enums should have plural names - -A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1715](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715): Identifiers should have correct prefix - -The name of an externally visible interface does not start with an uppercase ""I"". The name of a generic type parameter on an externally visible type or method does not start with an uppercase ""T"". - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1716](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716): Identifiers should not match keywords - -A namespace name or a type name matches a reserved keyword in a programming language. Identifiers for namespaces and types should not match keywords that are defined by languages that target the common language runtime. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1717](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717): Only FlagsAttribute enums should have plural names - -Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1720](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720): Identifier contains type name - -Names of parameters and members are better used to communicate their meaning than to describe their type, which is expected to be provided by development tools. For names of members, if a data type name must be used, use a language-independent name instead of a language-specific one. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1721](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1721): Property names should not match get methods - -The name of a public or protected member starts with ""Get"" and otherwise matches the name of a public or protected property. ""Get"" methods and properties should have names that clearly distinguish their function. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1724](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724): Type names should not match namespaces - -Type names should not match the names of namespaces that are defined in the .NET Framework class library. Violating this rule can reduce the usability of the library. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1725](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725): Parameter names should match base declaration - -Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method. - -|Item|Value| -|-|-| -|Category|Naming| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1802](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1802): Use literals where appropriate - -A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at run?time. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1805](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1805): Do not initialize unnecessarily - -The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed. In some cases, such as with static readonly fields that permanently retain their default value, consider instead changing them to be constants or properties. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1806](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806): Do not ignore method results - -A new object is created but never used; or a method that creates and returns a new string is called and the new string is never used; or a COM or P/Invoke method returns an HRESULT or error code that is never used. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1812](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812): Avoid uninstantiated internal classes - -An instance of an assembly-level type is not created by code in the assembly. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1814](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1814): Prefer jagged arrays over multidimensional - -A jagged array is an array whose elements are arrays. The arrays that make up the elements can be of different sizes, leading to less wasted space for some sets of data. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1815](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1815): Override equals and operator equals on value types - -For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1819](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1819): Properties should not return arrays - -Arrays that are returned by properties are not write-protected, even when the property is read-only. To keep the array tamper-proof, the property must return a copy of the array. Typically, users will not understand the adverse performance implications of calling such a property. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1821](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1821): Remove empty Finalizers - -Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1822](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822): Mark members as static - -Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1823](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823): Avoid unused private fields - -Private fields were detected that do not appear to be accessed in the assembly. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2007](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007): Consider calling ConfigureAwait on the awaited task - -When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2011](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2011): Avoid infinite recursion - -Do not assign the property within its setter. This call might result in an infinite recursion. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2109](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2109): Review visible event handlers - -A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2119](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2119): Seal methods that satisfy private interfaces - -An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2200](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2200): Rethrow to preserve stack details - -Re-throwing caught exception changes stack information - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2211](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2211): Non-constant fields should not be visible - -Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2214](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214): Do not call overridable methods in constructors - -Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called). - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2217](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2217): Do not mark enums with FlagsAttribute - -An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2218](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2218): Override GetHashCode on overriding Equals - -GetHashCode returns a value, based on the current instance, that is suited for hashing algorithms and data structures such as a hash table. Two objects that are the same type and are equal must return the same hash code. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2219](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2219): Do not raise exceptions in finally clauses - -When an exception is raised in a finally clause, the new exception hides the active exception. This makes the original error difficult to detect and debug. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2224](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2224): Override Equals on overloading operator equals - -A public type implements the equality operator but does not override Object.Equals. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2225](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2225): Operator overloads have named alternates - -An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2226](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2226): Operators should have symmetrical overloads - -A type implements the equality or inequality operator and does not implement the opposite operator. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2227](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227): Collection properties should be read only - -A writable collection property allows a user to replace the collection with a different collection. A read-only property stops the collection from being replaced but still allows the individual members to be set. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2231](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2231): Overload operator equals on overriding value type Equals - -In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2234](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234): Pass system uri objects instead of strings - -A call is made to a method that has a string parameter whose name contains "uri", "URI", "urn", "URN", "url", or "URL". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2244](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2244): Do not duplicate indexed element initializations - -Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2245](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2245): Do not assign a property to itself - -The property {0} should not be assigned to itself - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2246](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2246): Assigning symbol and its member in the same statement - -Assigning to a symbol and its member (field/property) in the same statement is not recommended. It is not clear if the member access was intended to use symbol's old value prior to the assignment or new value from the assignment in this statement. For clarity, consider splitting the assignments into separate statements. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA9998](https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers): Analyzer package has been deprecated - -FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- diff --git a/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.sarif b/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.sarif deleted file mode 100644 index 09971cd0af..0000000000 --- a/src/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.sarif +++ /dev/null @@ -1,2271 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/sarif-1.0.0", - "version": "1.0.0", - "runs": [ - { - "tool": { - "name": "Humanizer", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1000": { - "id": "CA1000", - "shortDescription": "Do not declare static members on generic types", - "fullDescription": "When a static member of a generic type is called, the type argument must be specified for the type. When a generic instance member that does not support inference is called, the type argument must be specified for the member. In these two cases, the syntax for specifying the type argument is different and easily confused.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1000", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareStaticMembersOnGenericTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1002": { - "id": "CA1002", - "shortDescription": "Do not expose generic lists", - "fullDescription": "System.Collections.Generic.List is a generic collection that's designed for performance and not inheritance. List does not contain virtual members that make it easier to change the behavior of an inherited class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1002", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotExposeGenericLists", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1003": { - "id": "CA1003", - "shortDescription": "Use generic event handler instances", - "fullDescription": "A type contains an event that declares an EventHandler delegate that returns void, whose signature contains two parameters (the first an object and the second a type that is assignable to EventArgs), and the containing assembly targets Microsoft .NET Framework?2.0.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1003", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "UseGenericEventHandlerInstancesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1005": { - "id": "CA1005", - "shortDescription": "Avoid excessive parameters on generic types", - "fullDescription": "The more type parameters a generic type contains, the more difficult it is to know and remember what each type parameter represents.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1005", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AvoidExcessiveParametersOnGenericTypes", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1008": { - "id": "CA1008", - "shortDescription": "Enums should have zero value", - "fullDescription": "The default value of an uninitialized enumeration, just as other value types, is zero. A nonflags-attributed enumeration should define a member by using the value of zero so that the default value is a valid value of the enumeration. If an enumeration that has the FlagsAttribute attribute applied defines a zero-valued member, its name should be \"\"None\"\" to indicate that no values have been set in the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1008", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "EnumsShouldHaveZeroValueAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "RuleNoZero" - ] - } - }, - "CA1010": { - "id": "CA1010", - "shortDescription": "Generic interface should also be implemented", - "fullDescription": "To broaden the usability of a type, implement one of the generic interfaces. This is especially true for collections as they can then be used to populate generic collection types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1010", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CollectionsShouldImplementGenericInterfaceAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1012": { - "id": "CA1012", - "shortDescription": "Abstract types should not have public constructors", - "fullDescription": "Constructors on abstract types can be called only by derived types. Because public constructors create instances of a type, and you cannot create instances of an abstract type, an abstract type that has a public constructor is incorrectly designed.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1012", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AbstractTypesShouldNotHaveConstructorsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1014": { - "id": "CA1014", - "shortDescription": "Mark assemblies with CLSCompliant", - "fullDescription": "The Common Language Specification (CLS) defines naming restrictions, data types, and rules to which assemblies must conform if they will be used across programming languages. Good design dictates that all assemblies explicitly indicate CLS compliance by using CLSCompliantAttribute . If this attribute is not present on an assembly, the assembly is not compliant.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1014", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1016": { - "id": "CA1016", - "shortDescription": "Mark assemblies with assembly version", - "fullDescription": "The .NET Framework uses the version number to uniquely identify an assembly, and to bind to types in strongly named assemblies. The version number is used together with version and publisher policy. By default, applications run only with the assembly version with which they were built.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1016", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "MarkAssembliesWithAttributesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1017": { - "id": "CA1017", - "shortDescription": "Mark assemblies with ComVisible", - "fullDescription": "ComVisibleAttribute determines how COM clients access managed code. Good design dictates that assemblies explicitly indicate COM visibility. COM visibility can be set for the whole assembly and then overridden for individual types and type members. If this attribute is not present, the contents of the assembly are visible to COM clients.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1017", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MarkAssembliesWithComVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1018": { - "id": "CA1018", - "shortDescription": "Mark attributes with AttributeUsageAttribute", - "fullDescription": "Specify AttributeUsage on {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1018", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "MarkAttributesWithAttributeUsageAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1021": { - "id": "CA1021", - "shortDescription": "Avoid out parameters", - "fullDescription": "Passing types by reference (using 'out' or 'ref') requires experience with pointers, understanding how value types and reference types differ, and handling methods with multiple return values. Also, the difference between 'out' and 'ref' parameters is not widely understood.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1021", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "AvoidOutParameters", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1024": { - "id": "CA1024", - "shortDescription": "Use properties where appropriate", - "fullDescription": "A public or protected method has a name that starts with \"\"Get\"\", takes no parameters, and returns a value that is not an array. The method might be a good candidate to become a property.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1024", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "UsePropertiesWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1027": { - "id": "CA1027", - "shortDescription": "Mark enums with FlagsAttribute", - "fullDescription": "An enumeration is a value type that defines a set of related named constants. Apply FlagsAttribute to an enumeration when its named constants can be meaningfully combined.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1027", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "EnumWithFlagsAttributeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1028": { - "id": "CA1028", - "shortDescription": "Enum Storage should be Int32", - "fullDescription": "An enumeration is a value type that defines a set of related named constants. By default, the System.Int32 data type is used to store the constant value. Although you can change this underlying type, it is not required or recommended for most scenarios.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1028", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EnumStorageShouldBeInt32Analyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1030": { - "id": "CA1030", - "shortDescription": "Use events where appropriate", - "fullDescription": "This rule detects methods that have names that ordinarily would be used for events. If a method is called in response to a clearly defined state change, the method should be invoked by an event handler. Objects that call the method should raise events instead of calling the method directly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1030", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UseEventsWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1031": { - "id": "CA1031", - "shortDescription": "Do not catch general exception types", - "fullDescription": "A general exception such as System.Exception or System.SystemException or a disallowed exception type is caught in a catch statement, or a general catch clause is used. General and disallowed exceptions should not be caught.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1031", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotCatchGeneralExceptionTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1033": { - "id": "CA1033", - "shortDescription": "Interface methods should be callable by child types", - "fullDescription": "An unsealed externally visible type provides an explicit method implementation of a public interface and does not provide an alternative externally visible method that has the same name.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1033", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "InterfaceMethodsShouldBeCallableByChildTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1034": { - "id": "CA1034", - "shortDescription": "Nested types should not be visible", - "fullDescription": "A nested type is a type that is declared in the scope of another type. Nested types are useful to encapsulate private implementation details of the containing type. Used for this purpose, nested types should not be externally visible.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1034", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "NestedTypesShouldNotBeVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1036": { - "id": "CA1036", - "shortDescription": "Override methods on comparable types", - "fullDescription": "A public or protected type implements the System.IComparable interface. It does not override Object.Equals nor does it overload the language-specific operator for equality, inequality, less than, less than or equal, greater than or greater than or equal.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1036", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "OverrideMethodsOnComparableTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1040": { - "id": "CA1040", - "shortDescription": "Avoid empty interfaces", - "fullDescription": "Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members; therefore, it does not define a contract that can be implemented.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1040", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "AvoidEmptyInterfacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1041": { - "id": "CA1041", - "shortDescription": "Provide ObsoleteAttribute message", - "fullDescription": "A type or member is marked by using a System.ObsoleteAttribute attribute that does not have its ObsoleteAttribute.Message property specified. When a type or member that is marked by using ObsoleteAttribute is compiled, the Message property of the attribute is displayed. This gives the user information about the obsolete type or member.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1041", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ProvideObsoleteAttributeMessageAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1043": { - "id": "CA1043", - "shortDescription": "Use Integral Or String Argument For Indexers", - "fullDescription": "Indexers, that is, indexed properties, should use integer or string types for the index. These types are typically used for indexing data structures and increase the usability of the library. Use of the Object type should be restricted to those cases where the specific integer or string type cannot be specified at design time. If the design requires other types for the index, reconsider whether the type represents a logical data store. If it does not represent a logical data store, use a method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1043", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UseIntegralOrStringArgumentForIndexersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1044": { - "id": "CA1044", - "shortDescription": "Properties should not be write only", - "fullDescription": "Although it is acceptable and often necessary to have a read-only property, the design guidelines prohibit the use of write-only properties. This is because letting a user set a value, and then preventing the user from viewing that value, does not provide any security. Also, without read access, the state of shared objects cannot be viewed, which limits their usefulness.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1044", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "PropertiesShouldNotBeWriteOnlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1045": { - "id": "CA1045", - "shortDescription": "Do not pass types by reference", - "fullDescription": "Passing types by reference (using out or ref) requires experience with pointers, understanding how value types and reference types differ, and handling methods that have multiple return values. Also, the difference between out and ref parameters is not widely understood.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1045", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotPassTypesByReference", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1046": { - "id": "CA1046", - "shortDescription": "Do not overload equality operator on reference types", - "fullDescription": "For reference types, the default implementation of the equality operator is almost always correct. By default, two references are equal only if they point to the same object. If the operator is providing meaningful value equality, the type should implement the generic 'System.IEquatable' interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1046", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DoNotOverloadOperatorEqualsOnReferenceTypes", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1047": { - "id": "CA1047", - "shortDescription": "Do not declare protected member in sealed type", - "fullDescription": "Types declare protected members so that inheriting types can access or override the member. By definition, you cannot inherit from a sealed type, which means that protected methods on sealed types cannot be called.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1047", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareProtectedMembersInSealedTypes", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1050": { - "id": "CA1050", - "shortDescription": "Declare types in namespaces", - "fullDescription": "Types are declared in namespaces to prevent name collisions and as a way to organize related types in an object hierarchy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1050", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "DeclareTypesInNamespacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1051": { - "id": "CA1051", - "shortDescription": "Do not declare visible instance fields", - "fullDescription": "The primary use of a field should be as an implementation detail. Fields should be private or internal and should be exposed by using properties.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1051", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareVisibleInstanceFieldsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1052": { - "id": "CA1052", - "shortDescription": "Static holder types should be Static or NotInheritable", - "fullDescription": "Type '{0}' is a static holder type but is neither static nor NotInheritable", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1052", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "StaticHolderTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1054": { - "id": "CA1054", - "shortDescription": "URI-like parameters should not be strings", - "fullDescription": "This rule assumes that the parameter represents a Uniform Resource Identifier (URI). A string representation or a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. 'System.Uri' class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1054", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriParametersShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1055": { - "id": "CA1055", - "shortDescription": "URI-like return values should not be strings", - "fullDescription": "This rule assumes that the method returns a URI. A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1055", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriReturnValuesShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1056": { - "id": "CA1056", - "shortDescription": "URI-like properties should not be strings", - "fullDescription": "This rule assumes that the property represents a Uniform Resource Identifier (URI). A string representation of a URI is prone to parsing and encoding errors, and can lead to security vulnerabilities. The System.Uri class provides these services in a safe and secure manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1056", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "UriPropertiesShouldNotBeStringsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1060": { - "id": "CA1060", - "shortDescription": "Move pinvokes to native methods class", - "fullDescription": "Platform Invocation methods, such as those that are marked by using the System.Runtime.InteropServices.DllImportAttribute attribute, or methods that are defined by using the Declare keyword in Visual Basic, access unmanaged code. These methods should be of the NativeMethods, SafeNativeMethods, or UnsafeNativeMethods class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1060", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "MovePInvokesToNativeMethodsClassAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry" - ] - } - }, - "CA1061": { - "id": "CA1061", - "shortDescription": "Do not hide base class methods", - "fullDescription": "A method in a base type is hidden by an identically named method in a derived type when the parameter signature of the derived method differs only by types that are more weakly derived than the corresponding types in the parameter signature of the base method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1061", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotHideBaseClassMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1062": { - "id": "CA1062", - "shortDescription": "Validate arguments of public methods", - "fullDescription": "An externally visible method dereferences one of its reference arguments without verifying whether that argument is null (Nothing in Visual Basic). All reference arguments that are passed to externally visible methods should be checked against null. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. If the method is designed to be called only by known assemblies, you should make the method internal.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ValidateArgumentsOfPublicMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1063": { - "id": "CA1063", - "shortDescription": "Implement IDisposable Correctly", - "fullDescription": "All IDisposable types should implement the Dispose pattern correctly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1063", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ImplementIDisposableCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1064": { - "id": "CA1064", - "shortDescription": "Exceptions should be public", - "fullDescription": "An internal exception is visible only inside its own internal scope. After the exception falls outside the internal scope, only the base exception can be used to catch the exception. If the internal exception is inherited from T:System.Exception, T:System.SystemException, or T:System.ApplicationException, the external code will not have sufficient information to know what to do with the exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1064", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "ExceptionsShouldBePublicAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1066": { - "id": "CA1066", - "shortDescription": "Implement IEquatable when overriding Object.Equals", - "fullDescription": "When a type T overrides Object.Equals(object), the implementation must cast the object argument to the correct type T before performing the comparison. If the type implements IEquatable, and therefore offers the method T.Equals(T), and if the argument is known at compile time to be of type T, then the compiler can call IEquatable.Equals(T) instead of Object.Equals(object), and no cast is necessary, improving performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1066", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EquatableAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1067": { - "id": "CA1067", - "shortDescription": "Override Object.Equals(object) when implementing IEquatable", - "fullDescription": "When a type T implements the interface IEquatable, it suggests to a user who sees a call to the Equals method in source code that an instance of the type can be equated with an instance of any other type. The user might be confused if their attempt to equate the type with an instance of another type fails to compile. This violates the \"principle of least surprise\".", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1067", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EquatableAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1068": { - "id": "CA1068", - "shortDescription": "CancellationToken parameters must come last", - "fullDescription": "Method '{0}' should take CancellationToken as the last parameter", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1068", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CancellationTokenParametersMustComeLastAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1069": { - "id": "CA1069", - "shortDescription": "Enums values should not be duplicated", - "fullDescription": "The field reference '{0}' is duplicated in this bitwise initialization", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1069", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "EnumShouldNotHaveDuplicatedValues", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1070": { - "id": "CA1070", - "shortDescription": "Do not declare event fields as virtual", - "fullDescription": "Do not declare virtual events in a base class. Overridden events in a derived class have undefined behavior. The C# compiler does not handle this correctly and it is unpredictable whether a subscriber to the derived event will actually be subscribing to the base class event.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1070", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "DoNotDeclareEventFieldsAsVirtual", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1501": { - "id": "CA1501", - "shortDescription": "Avoid excessive inheritance", - "fullDescription": "Deeply nested type hierarchies can be difficult to follow, understand, and maintain. This rule limits analysis to hierarchies in the same module. To fix a violation of this rule, derive the type from a base type that is less deep in the inheritance hierarchy or eliminate some of the intermediate base types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1501", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1502": { - "id": "CA1502", - "shortDescription": "Avoid excessive complexity", - "fullDescription": "Cyclomatic complexity measures the number of linearly independent paths through the method, which is determined by the number and complexity of conditional branches. A low cyclomatic complexity generally indicates a method that is easy to understand, test, and maintain. The cyclomatic complexity is calculated from a control flow graph of the method and is given as follows: `cyclomatic complexity = the number of edges - the number of nodes + 1`, where a node represents a logic branch point and an edge represents a line between nodes.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1502", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1505": { - "id": "CA1505", - "shortDescription": "Avoid unmaintainable code", - "fullDescription": "The maintainability index is calculated by using the following metrics: lines of code, program volume, and cyclomatic complexity. Program volume is a measure of the difficulty of understanding of a symbol that is based on the number of operators and operands in the code. Cyclomatic complexity is a measure of the structural complexity of the type or method. A low maintainability index indicates that code is probably difficult to maintain and would be a good candidate to redesign.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1505", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1506": { - "id": "CA1506", - "shortDescription": "Avoid excessive class coupling", - "fullDescription": "This rule measures class coupling by counting the number of unique type references that a symbol contains. Symbols that have a high degree of class coupling can be difficult to maintain. It is a good practice to have types and methods that exhibit low coupling and high cohesion. To fix this violation, try to redesign the code to reduce the number of types to which it is coupled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1506", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1508": { - "id": "CA1508", - "shortDescription": "Avoid dead conditional code", - "fullDescription": "'{0}' is never '{1}'. Remove or refactor the condition(s) to avoid dead code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1508", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "AvoidDeadConditionalCode", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1509": { - "id": "CA1509", - "shortDescription": "Invalid entry in code metrics rule specification file", - "fullDescription": "Invalid entry in code metrics rule specification file.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1509", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": false, - "typeName": "CodeMetricsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "CompilationEnd" - ] - } - }, - "CA1700": { - "id": "CA1700", - "shortDescription": "Do not name enum values 'Reserved'", - "fullDescription": "This rule assumes that an enumeration member that has a name that contains \"reserved\" is not currently used but is a placeholder to be renamed or removed in a future version. Renaming or removing a member is a breaking change.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1700", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "DoNotNameEnumValuesReserved", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1707": { - "id": "CA1707", - "shortDescription": "Identifiers should not contain underscores", - "fullDescription": "By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotContainUnderscoresAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1708": { - "id": "CA1708", - "shortDescription": "Identifiers should differ by more than case", - "fullDescription": "Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1708", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "IdentifiersShouldDifferByMoreThanCaseAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1710": { - "id": "CA1710", - "shortDescription": "Identifiers should have correct suffix", - "fullDescription": "By convention, the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, have a suffix that is associated with the base type or interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1710", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldHaveCorrectSuffixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1711": { - "id": "CA1711", - "shortDescription": "Identifiers should not have incorrect suffix", - "fullDescription": "By convention, only the names of types that extend certain base types or that implement certain interfaces, or types that are derived from these types, should end with specific reserved suffixes. Other type names should not use these reserved suffixes.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "IdentifiersShouldNotHaveIncorrectSuffixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1712": { - "id": "CA1712", - "shortDescription": "Do not prefix enum values with type name", - "fullDescription": "An enumeration's values should not start with the type name of the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "DoNotPrefixEnumValuesWithTypeNameAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1713": { - "id": "CA1713", - "shortDescription": "Events should not have 'Before' or 'After' prefix", - "fullDescription": "Event names should describe the action that raises the event. To name related events that are raised in a specific sequence, use the present or past tense to indicate the relative position in the sequence of actions. For example, when naming a pair of events that is raised when closing a resource, you might name it 'Closing' and 'Closed', instead of 'BeforeClose' and 'AfterClose'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1713", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EventsShouldNotHaveBeforeOrAfterPrefix", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1714": { - "id": "CA1714", - "shortDescription": "Flags enums should have plural names", - "fullDescription": "A public enumeration has the System.FlagsAttribute attribute, and its name does not end in \"\"s\"\". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EnumsShouldHavePluralNamesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1715": { - "id": "CA1715", - "shortDescription": "Identifiers should have correct prefix", - "fullDescription": "The name of an externally visible interface does not start with an uppercase \"\"I\"\". The name of a generic type parameter on an externally visible type or method does not start with an uppercase \"\"T\"\".", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1715", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldHaveCorrectPrefixAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1716": { - "id": "CA1716", - "shortDescription": "Identifiers should not match keywords", - "fullDescription": "A namespace name or a type name matches a reserved keyword in a programming language. Identifiers for namespaces and types should not match keywords that are defined by languages that target the common language runtime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1716", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotMatchKeywordsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1717": { - "id": "CA1717", - "shortDescription": "Only FlagsAttribute enums should have plural names", - "fullDescription": "Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "EnumsShouldHavePluralNamesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1720": { - "id": "CA1720", - "shortDescription": "Identifier contains type name", - "fullDescription": "Names of parameters and members are better used to communicate their meaning than to describe their type, which is expected to be provided by development tools. For names of members, if a data type name must be used, use a language-independent name instead of a language-specific one.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1720", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "IdentifiersShouldNotContainTypeNames", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1721": { - "id": "CA1721", - "shortDescription": "Property names should not match get methods", - "fullDescription": "The name of a public or protected member starts with \"\"Get\"\" and otherwise matches the name of a public or protected property. \"\"Get\"\" methods and properties should have names that clearly distinguish their function.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1721", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "PropertyNamesShouldNotMatchGetMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1724": { - "id": "CA1724", - "shortDescription": "Type names should not match namespaces", - "fullDescription": "Type names should not match the names of namespaces that are defined in the .NET Framework class library. Violating this rule can reduce the usability of the library.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1724", - "properties": { - "category": "Naming", - "isEnabledByDefault": true, - "typeName": "TypeNamesShouldNotMatchNamespacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1725": { - "id": "CA1725", - "shortDescription": "Parameter names should match base declaration", - "fullDescription": "Consistent naming of parameters in an override hierarchy increases the usability of the method overrides. A parameter name in a derived method that differs from the name in the base declaration can cause confusion about whether the method is an override of the base method or a new overload of the method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1725", - "properties": { - "category": "Naming", - "isEnabledByDefault": false, - "typeName": "ParameterNamesShouldMatchBaseDeclarationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1802": { - "id": "CA1802", - "shortDescription": "Use literals where appropriate", - "fullDescription": "A field is declared static and read-only (Shared and ReadOnly in Visual Basic), and is initialized by using a value that is computable at compile time. Because the value that is assigned to the targeted field is computable at compile time, change the declaration to a const (Const in Visual Basic) field so that the value is computed at compile time instead of at run?time.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1802", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseLiteralsWhereAppropriateAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1805": { - "id": "CA1805", - "shortDescription": "Do not initialize unnecessarily", - "fullDescription": "The .NET runtime initializes all fields of reference types to their default values before running the constructor. In most cases, explicitly initializing a field to its default value in a constructor is redundant, adding maintenance costs and potentially degrading performance (such as with increased assembly size), and the explicit initialization can be removed. In some cases, such as with static readonly fields that permanently retain their default value, consider instead changing them to be constants or properties.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1805", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotInitializeUnnecessarilyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1806": { - "id": "CA1806", - "shortDescription": "Do not ignore method results", - "fullDescription": "A new object is created but never used; or a method that creates and returns a new string is called and the new string is never used; or a COM or P/Invoke method returns an HRESULT or error code that is never used.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1806", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotIgnoreMethodResultsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1814": { - "id": "CA1814", - "shortDescription": "Prefer jagged arrays over multidimensional", - "fullDescription": "A jagged array is an array whose elements are arrays. The arrays that make up the elements can be of different sizes, leading to less wasted space for some sets of data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1814", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferJaggedArraysOverMultidimensionalAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1815": { - "id": "CA1815", - "shortDescription": "Override equals and operator equals on value types", - "fullDescription": "For value types, the inherited implementation of Equals uses the Reflection library and compares the contents of all fields. Reflection is computationally expensive, and comparing every field for equality might be unnecessary. If you expect users to compare or sort instances, or to use instances as hash table keys, your value type should implement Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1815", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "OverrideEqualsAndOperatorEqualsOnValueTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1819": { - "id": "CA1819", - "shortDescription": "Properties should not return arrays", - "fullDescription": "Arrays that are returned by properties are not write-protected, even when the property is read-only. To keep the array tamper-proof, the property must return a copy of the array. Typically, users will not understand the adverse performance implications of calling such a property.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1819", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PropertiesShouldNotReturnArraysAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1821": { - "id": "CA1821", - "shortDescription": "Remove empty Finalizers", - "fullDescription": "Finalizers should be avoided where possible, to avoid the additional performance overhead involved in tracking object lifetime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1821", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "RemoveEmptyFinalizersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1822": { - "id": "CA1822", - "shortDescription": "Mark members as static", - "fullDescription": "Members that do not access instance data or call instance methods can be marked as static. After you mark the methods as static, the compiler will emit nonvirtual call sites to these members. This can give you a measurable performance gain for performance-sensitive code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1822", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "MarkMembersAsStaticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1823": { - "id": "CA1823", - "shortDescription": "Avoid unused private fields", - "fullDescription": "Private fields were detected that do not appear to be accessed in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "AvoidUnusedPrivateFieldsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2007": { - "id": "CA2007", - "shortDescription": "Consider calling ConfigureAwait on the awaited task", - "fullDescription": "When an asynchronous method awaits a Task directly, continuation occurs in the same thread that created the task. Consider calling Task.ConfigureAwait(Boolean) to signal your intention for continuation. Call ConfigureAwait(false) on the task to schedule continuations to the thread pool, thereby avoiding a deadlock on the UI thread. Passing false is a good option for app-independent libraries. Calling ConfigureAwait(true) on the task has the same behavior as not explicitly calling ConfigureAwait. By explicitly calling this method, you're letting readers know you intentionally want to perform the continuation on the original synchronization context.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2007", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotDirectlyAwaitATaskAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2011": { - "id": "CA2011", - "shortDescription": "Avoid infinite recursion", - "fullDescription": "Do not assign the property within its setter. This call might result in an infinite recursion.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2011", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "AvoidInfiniteRecursion", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2109": { - "id": "CA2109", - "shortDescription": "Review visible event handlers", - "fullDescription": "A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2109", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewVisibleEventHandlersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2119": { - "id": "CA2119", - "shortDescription": "Seal methods that satisfy private interfaces", - "fullDescription": "An inheritable public type provides an overridable method implementation of an internal (Friend in Visual Basic) interface. To fix a violation of this rule, prevent the method from being overridden outside the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2119", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SealMethodsThatSatisfyPrivateInterfacesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2200": { - "id": "CA2200", - "shortDescription": "Rethrow to preserve stack details", - "fullDescription": "Re-throwing caught exception changes stack information", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2200", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "RethrowToPreserveStackDetailsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2211": { - "id": "CA2211", - "shortDescription": "Non-constant fields should not be visible", - "fullDescription": "Static fields that are neither constants nor read-only are not thread-safe. Access to such a field must be carefully controlled and requires advanced programming techniques to synchronize access to the class object.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2211", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "NonConstantFieldsShouldNotBeVisibleAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2214": { - "id": "CA2214", - "shortDescription": "Do not call overridable methods in constructors", - "fullDescription": "Virtual methods defined on the class should not be called from constructors. If a derived class has overridden the method, the derived class version will be called (before the derived class constructor is called).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2214", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotCallOverridableMethodsInConstructorsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2217": { - "id": "CA2217", - "shortDescription": "Do not mark enums with FlagsAttribute", - "fullDescription": "An externally visible enumeration is marked by using FlagsAttribute, and it has one or more values that are not powers of two or a combination of the other defined values on the enumeration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2217", - "properties": { - "category": "Usage", - "isEnabledByDefault": false, - "typeName": "EnumWithFlagsAttributeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2219": { - "id": "CA2219", - "shortDescription": "Do not raise exceptions in finally clauses", - "fullDescription": "When an exception is raised in a finally clause, the new exception hides the active exception. This makes the original error difficult to detect and debug.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2219", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotRaiseExceptionsInExceptionClausesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2225": { - "id": "CA2225", - "shortDescription": "Operator overloads have named alternates", - "fullDescription": "An operator overload was detected, and the expected named alternative method was not found. The named alternative member provides access to the same functionality as the operator and is provided for developers who program in languages that do not support overloaded operators.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2225", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OperatorOverloadsHaveNamedAlternatesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2226": { - "id": "CA2226", - "shortDescription": "Operators should have symmetrical overloads", - "fullDescription": "A type implements the equality or inequality operator and does not implement the opposite operator.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2226", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OperatorsShouldHaveSymmetricalOverloadsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2227": { - "id": "CA2227", - "shortDescription": "Collection properties should be read only", - "fullDescription": "A writable collection property allows a user to replace the collection with a different collection. A read-only property stops the collection from being replaced but still allows the individual members to be set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2227", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CollectionPropertiesShouldBeReadOnlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2231": { - "id": "CA2231", - "shortDescription": "Overload operator equals on overriding value type Equals", - "fullDescription": "In most programming languages there is no default implementation of the equality operator (==) for value types. If your programming language supports operator overloads, you should consider implementing the equality operator. Its behavior should be identical to that of Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2231", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "OverloadOperatorEqualsOnOverridingValueTypeEqualsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2244": { - "id": "CA2244", - "shortDescription": "Do not duplicate indexed element initializations", - "fullDescription": "Indexed elements in objects initializers must initialize unique elements. A duplicate index might overwrite a previous element initialization.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2244", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AvoidDuplicateElementInitialization", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2245": { - "id": "CA2245", - "shortDescription": "Do not assign a property to itself", - "fullDescription": "The property {0} should not be assigned to itself", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2245", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AvoidPropertySelfAssignment", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2246": { - "id": "CA2246", - "shortDescription": "Assigning symbol and its member in the same statement", - "fullDescription": "Assigning to a symbol and its member (field/property) in the same statement is not recommended. It is not clear if the member access was intended to use symbol's old value prior to the assignment or new value from the assignment in this statement. For clarity, consider splitting the assignments into separate statements.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2246", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AssigningSymbolAndItsMemberInSameStatement", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1001": { - "id": "CA1001", - "shortDescription": "Types that own disposable fields should be disposable", - "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1019": { - "id": "CA1019", - "shortDescription": "Define accessors for attribute arguments", - "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "CSharpDefineAccessorsForAttributeArgumentsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1032": { - "id": "CA1032", - "shortDescription": "Implement standard exception constructors", - "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpImplementStandardExceptionConstructorsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1065": { - "id": "CA1065", - "shortDescription": "Do not raise exceptions in unexpected locations", - "fullDescription": "A method that is not expected to throw exceptions throws an exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1200": { - "id": "CA1200", - "shortDescription": "Avoid using cref tags with a prefix", - "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200", - "properties": { - "category": "Documentation", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidUsingCrefTagsWithAPrefixAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1507": { - "id": "CA1507", - "shortDescription": "Use nameof to express symbol names", - "fullDescription": "Using nameof helps keep your code valid when refactoring.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": true, - "typeName": "CSharpUseNameofInPlaceOfStringAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1812": { - "id": "CA1812", - "shortDescription": "Avoid uninstantiated internal classes", - "fullDescription": "An instance of an assembly-level type is not created by code in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidUninstantiatedInternalClasses", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2234": { - "id": "CA2234", - "shortDescription": "Pass system uri objects instead of strings", - "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CSharpPassSystemUriObjectsInsteadOfStringsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.CodeQuality.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1001": { - "id": "CA1001", - "shortDescription": "Types that own disposable fields should be disposable", - "fullDescription": "A class declares and implements an instance field that is a System.IDisposable type, and the class does not implement IDisposable. A class that declares an IDisposable field indirectly owns an unmanaged resource and should implement the IDisposable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1001", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicTypesThatOwnDisposableFieldsShouldBeDisposableAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1019": { - "id": "CA1019", - "shortDescription": "Define accessors for attribute arguments", - "fullDescription": "Remove the property setter from {0} or reduce its accessibility because it corresponds to positional argument {1}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1019", - "properties": { - "category": "Design", - "isEnabledByDefault": false, - "typeName": "BasicDefineAccessorsForAttributeArgumentsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1032": { - "id": "CA1032", - "shortDescription": "Implement standard exception constructors", - "fullDescription": "Failure to provide the full set of constructors can make it difficult to correctly handle exceptions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1032", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicImplementStandardExceptionConstructorsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1065": { - "id": "CA1065", - "shortDescription": "Do not raise exceptions in unexpected locations", - "fullDescription": "A method that is not expected to throw exceptions throws an exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1065", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "BasicDoNotRaiseExceptionsInUnexpectedLocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1200": { - "id": "CA1200", - "shortDescription": "Avoid using cref tags with a prefix", - "fullDescription": "Use of cref tags with prefixes should be avoided, since it prevents the compiler from verifying references and the IDE from updating references during refactorings. It is permissible to suppress this error at a single documentation site if the cref must use a prefix because the type being mentioned is not findable by the compiler. For example, if a cref is mentioning a special attribute in the full framework but you're in a file that compiles against the portable framework, or if you want to reference a type at higher layer of Roslyn, you should suppress the error. You should not suppress the error just because you want to take a shortcut and avoid using the full syntax.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1200", - "properties": { - "category": "Documentation", - "isEnabledByDefault": true, - "typeName": "BasicAvoidUsingCrefTagsWithAPrefixAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1507": { - "id": "CA1507", - "shortDescription": "Use nameof to express symbol names", - "fullDescription": "Using nameof helps keep your code valid when refactoring.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1507", - "properties": { - "category": "Maintainability", - "isEnabledByDefault": true, - "typeName": "BasicUseNameofInPlaceOfStringAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1812": { - "id": "CA1812", - "shortDescription": "Avoid uninstantiated internal classes", - "fullDescription": "An instance of an assembly-level type is not created by code in the assembly.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1812", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicAvoidUninstantiatedInternalClasses", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2218": { - "id": "CA2218", - "shortDescription": "Override GetHashCode on overriding Equals", - "fullDescription": "GetHashCode returns a value, based on the current instance, that is suited for hashing algorithms and data structures such as a hash table. Two objects that are the same type and are equal must return the same hash code.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2218", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicOverrideGetHashCodeOnOverridingEqualsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2224": { - "id": "CA2224", - "shortDescription": "Override Equals on overloading operator equals", - "fullDescription": "A public type implements the equality operator but does not override Object.Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2224", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicOverrideEqualsOnOverloadingOperatorEqualsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2234": { - "id": "CA2234", - "shortDescription": "Pass system uri objects instead of strings", - "fullDescription": "A call is made to a method that has a string parameter whose name contains \"uri\", \"URI\", \"urn\", \"URN\", \"url\", or \"URL\". The declaring type of the method contains a corresponding method overload that has a System.Uri parameter.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2234", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "BasicPassSystemUriObjectsInsteadOfStringsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/src/Microsoft.CodeQuality.Analyzers/Setup/Microsoft.CodeQuality.Analyzers.Setup.csproj b/src/Microsoft.CodeQuality.Analyzers/Setup/Microsoft.CodeQuality.Analyzers.Setup.csproj deleted file mode 100644 index fc4b50b1f4..0000000000 --- a/src/Microsoft.CodeQuality.Analyzers/Setup/Microsoft.CodeQuality.Analyzers.Setup.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - net472 - false - false - false - false - true - false - true - - - - - Microsoft.CodeQuality.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.CodeQuality.CSharp.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.CodeQuality.VisualBasic.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - diff --git a/src/Microsoft.CodeQuality.Analyzers/Setup/Properties/launchSettings.json b/src/Microsoft.CodeQuality.Analyzers/Setup/Properties/launchSettings.json deleted file mode 100644 index 1830408569..0000000000 --- a/src/Microsoft.CodeQuality.Analyzers/Setup/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Visual Studio Extension": { - "executablePath": "$(DevEnvDir)devenv.exe", - "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" - } - } -} diff --git a/src/Microsoft.CodeQuality.Analyzers/Setup/source.extension.vsixmanifest b/src/Microsoft.CodeQuality.Analyzers/Setup/source.extension.vsixmanifest deleted file mode 100644 index c355b698d0..0000000000 --- a/src/Microsoft.CodeQuality.Analyzers/Setup/source.extension.vsixmanifest +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Microsoft.CodeQuality Analyzers - Microsoft.CodeQuality Analyzers - EULA.rtf - - - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.md b/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.md deleted file mode 100644 index 3cbe06ebdf..0000000000 --- a/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.md +++ /dev/null @@ -1,1717 +0,0 @@ -# Microsoft.NetCore.Analyzers - -## [CA1303](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303): Do not pass literals as localized parameters - -A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1304](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304): Specify CultureInfo - -A method or constructor calls a member that has an overload that accepts a System.Globalization.CultureInfo parameter, and the method or constructor does not call the overload that takes the CultureInfo parameter. When a CultureInfo or System.IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1305](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305): Specify IFormatProvider - -A method or constructor calls one or more members that have overloads that accept a System.IFormatProvider parameter, and the method or constructor does not call the overload that takes the IFormatProvider parameter. When a System.Globalization.CultureInfo or IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be based on the input from/output displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider'. Otherwise, if the result will be stored and accessed by software, such as when it is loaded from disk/database and when it is persisted to disk/database, specify 'CultureInfo.InvariantCulture'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1307](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307): Specify StringComparison for clarity - -A string comparison operation uses a method overload that does not set a StringComparison parameter. It is recommended to use the overload with StringComparison parameter for clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1308](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308): Normalize strings to uppercase - -Strings should be normalized to uppercase. A small group of characters cannot make a round trip when they are converted to lowercase. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1309](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309): Use ordinal string comparison - -A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1310](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310): Specify StringComparison for correctness - -A string comparison operation uses a method overload that does not set a StringComparison parameter, hence its behavior could vary based on the current user's locale settings. It is strongly recommended to use the overload with StringComparison parameter for correctness and clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1401](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1401): P/Invokes should not be visible - -A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1416](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416): Validate platform compatibility - -Using platform dependent API on a component makes the code no longer work across all platforms. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1417](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1417): Do not use 'OutAttribute' on string parameters for P/Invokes - -String parameters passed by value with the 'OutAttribute' can destabilize the runtime if the string is an interned string. - -|Item|Value| -|-|-| -|Category|Interoperability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1810](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810): Initialize reference type static fields inline - -A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1813](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1813): Avoid unsealed attributes - -The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|False| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1816](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1816): Dispose methods should call SuppressFinalize - -A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic). - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1820](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820): Test for empty strings using string length - -Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1824](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824): Mark assemblies with NeutralResourcesLanguageAttribute - -The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA1825](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825): Avoid zero-length array allocations - -Avoid unnecessary zero-length array allocations. Use {0} instead. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1826](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1826): Do not use Enumerable methods on indexable collections - -This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1827](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1827): Do not use Count() or LongCount() when Any() can be used - -For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1828](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1828): Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used - -For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1829](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829): Use Length/Count property instead of Count() when available - -Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1830](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830): Prefer strongly-typed Append and Insert method overloads on StringBuilder - -StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1831](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1831): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on string values produces a copy of requested portion of the string. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1832](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1832): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on array values produces a copy of requested portion of the array. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1833](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1833): Use AsSpan or AsMemory instead of Range-based indexers when appropriate - -The Range-based indexer on array values produces a copy of requested portion of the array. This copy is often unwanted when it is implicitly used as a Span or Memory value. Use the AsSpan method to avoid the copy. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1834](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1834): Consider using 'StringBuilder.Append(char)' when applicable - -'StringBuilder.Append(char)' is more efficient than 'StringBuilder.Append(string)' when the string is a single character. When calling 'Append' with a constant, prefer using a constant char rather than a constant string containing one character. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1835](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1835): Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' - -'Stream' has a 'ReadAsync' overload that takes a 'Memory\' as the first argument, and a 'WriteAsync' overload that takes a 'ReadOnlyMemory\' as the first argument. Prefer calling the memory based overloads, which are more efficient. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1836](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1836): Prefer IsEmpty over Count - -For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1837](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1837): Use 'Environment.ProcessId' - -'Environment.ProcessId' is simpler and faster than 'Process.GetCurrentProcess().Id'. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA1838](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1838): Avoid 'StringBuilder' parameters for P/Invokes - -Marshalling of 'StringBuilder' always creates a native buffer copy, resulting in multiple allocations for one marshalling operation. - -|Item|Value| -|-|-| -|Category|Performance| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2000): Dispose objects before losing scope - -If a disposable object is not explicitly disposed before all references to it are out of scope, the object will be disposed at some indeterminate time when the garbage collector runs the finalizer of the object. Because an exceptional event might occur that will prevent the finalizer of the object from running, the object should be explicitly disposed instead. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2002): Do not lock on objects with weak identity - -An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2008): Do not create tasks without passing a TaskScheduler - -Do not create tasks unless you are using one of the overloads that takes a TaskScheduler. The default is to schedule on TaskScheduler.Current, which would lead to deadlocks. Either use TaskScheduler.Default to schedule on the thread pool, or explicitly pass TaskScheduler.Current to make your intentions clear. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2009](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2009): Do not call ToImmutableCollection on an ImmutableCollection value - -Do not call {0} on an {1} value - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2012): Use ValueTasks correctly - -ValueTasks returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2013](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013): Do not use ReferenceEquals with value types - -Value type typed arguments are uniquely boxed for each call to this method, therefore the result is always false. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2014](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2014): Do not use stackalloc in loops - -Stack space allocated by a stackalloc is only released at the end of the current method's invocation. Using it in a loop can result in unbounded stack growth and eventual stack overflow conditions. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2015](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2015): Do not define finalizers for types derived from MemoryManager\ - -Adding a finalizer to a type derived from MemoryManager\ may permit memory to be freed while it is still in use by a Span\. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2016](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016): Forward the 'CancellationToken' parameter to methods that take one - -Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2100](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2100): Review SQL queries for security vulnerabilities - -SQL queries that directly use user input can be vulnerable to SQL injection attacks. Review this SQL query for potential vulnerabilities, and consider using a parameterized SQL query. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2101](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2101): Specify marshaling for P/Invoke string arguments - -A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability. - -|Item|Value| -|-|-| -|Category|Globalization| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2201](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2201): Do not raise reserved exception types - -An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2207](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2207): Initialize value type static fields inline - -A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2208](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2208): Instantiate argument exceptions correctly - -A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2213](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2213): Disposable fields should be disposed - -A type that implements System.IDisposable declares fields that are of types that also implement IDisposable. The Dispose method of the field is not called by the Dispose method of the declaring type. To fix a violation of this rule, call Dispose on fields that are of types that implement IDisposable if you are responsible for allocating and releasing the unmanaged resources held by the field. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2215](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2215): Dispose methods should call base class dispose - -A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2216](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2216): Disposable types should declare finalizer - -A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2229](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2229): Implement serialization constructors - -To fix a violation of this rule, implement the serialization constructor. For a sealed class, make the constructor private; otherwise, make it protected. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2235](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2235): Mark all non-serializable fields - -An instance field of a type that is not serializable is declared in a type that is serializable. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2237](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2237): Mark ISerializable types with serializable - -To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2241](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241): Provide correct arguments to formatting methods - -The format argument that is passed to System.String.Format does not contain a format item that corresponds to each object argument, or vice versa. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2242](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2242): Test for NaN correctly - -This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2243](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2243): Attribute string literals should parse correctly - -The string literal parameter of an attribute does not parse correctly for a URL, a GUID, or a version. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2247](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2247): Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum - -TaskCompletionSource has constructors that take TaskCreationOptions that control the underlying Task, and constructors that take object state that's stored in the task. Accidentally passing a TaskContinuationOptions instead of a TaskCreationOptions will result in the call treating the options as state. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2248](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2248): Provide correct 'enum' argument to 'Enum.HasFlag' - -'Enum.HasFlag' method expects the 'enum' argument to be of the same 'enum' type as the instance on which the method is invoked and that this 'enum' is marked with 'System.FlagsAttribute'. If these are different 'enum' types, an unhandled exception will be thrown at runtime. If the 'enum' type is not marked with 'System.FlagsAttribute' the call will always return 'false' at runtime. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2249](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249): Consider using 'string.Contains' instead of 'string.IndexOf' - -Calls to 'string.IndexOf' where the result is used to check for the presence/absence of a substring can be replaced by 'string.Contains'. - -|Item|Value| -|-|-| -|Category|Usage| -|Enabled|True| -|Severity|Warning| -|CodeFix|True| ---- - -## [CA2300](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2300): Do not use insecure deserializer BinaryFormatter - -The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect BinaryFormatter deserialization without a SerializationBinder set, then disable rule CA2300, and enable rules CA2301 and CA2302. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2301](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2301): Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2302](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2302): Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2305](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2305): Do not use insecure deserializer LosFormatter - -The method '{0}' is insecure when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2310](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2310): Do not use insecure deserializer NetDataContractSerializer - -The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect NetDataContractSerializer deserialization without a SerializationBinder set, then disable rule CA2310, and enable rules CA2311 and CA2312. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2311](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2311): Do not deserialize without first setting NetDataContractSerializer.Binder - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2312](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2312): Ensure NetDataContractSerializer.Binder is set before deserializing - -The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2315](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2315): Do not use insecure deserializer ObjectStateFormatter - -The method '{0}' is insecure when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2321](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2321): Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver - -The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Initialize JavaScriptSerializer without a JavaScriptTypeResolver specified, or initialize with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2322](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2322): Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing - -The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Ensure that the JavaScriptSerializer is initialized without a JavaScriptTypeResolver specified, or initialized with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2326](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2326): Do not use TypeNameHandling values other than None - -Deserializing JSON when using a TypeNameHandling value other than None can be insecure. If you need to instead detect Json.NET deserialization when a SerializationBinder isn't specified, then disable rule CA2326, and enable rules CA2327, CA2328, CA2329, and CA2330. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2327](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2327): Do not use insecure JsonSerializerSettings - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2328](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2328): Ensure that JsonSerializerSettings are secure - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, ensure TypeNameHandling.None is specified, or for values other than None, ensure a SerializationBinder is specified to restrict deserialized types. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2329](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2329): Do not deserialize with JsonSerializer using an insecure configuration - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2330](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2330): Ensure that JsonSerializer has a secure configuration when deserializing - -When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2350](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2350): Do not use DataTable.ReadXml() with untrusted data - -The method '{0}' is insecure when deserializing untrusted data - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2351](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2351): Do not use DataSet.ReadXml() with untrusted data - -The method '{0}' is insecure when deserializing untrusted data - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2352](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2352): Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks - -When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2353](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2353): Unsafe DataSet or DataTable in serializable type - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2354](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2354): Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2355](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2355): Unsafe DataSet or DataTable type found in deserializable object graph - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2356](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2356): Unsafe DataSet or DataTable type in web deserializable object graph - -When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2361](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2361): Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data - -The method '{0}' is insecure when deserializing untrusted data. Make sure that auto-generated class containing the '{0}' call is not deserialized with untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2362](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2362): Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks - -When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. Ensure that the auto-generated type is never deserialized with untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3001): Review code for SQL injection vulnerabilities - -Potential SQL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3002](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3002): Review code for XSS vulnerabilities - -Potential cross-site scripting (XSS) vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3003](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3003): Review code for file path injection vulnerabilities - -Potential file path injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3004](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3004): Review code for information disclosure vulnerabilities - -Potential information disclosure vulnerability was found where '{0}' in method '{1}' may contain unintended information from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3005](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3005): Review code for LDAP injection vulnerabilities - -Potential LDAP injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3006](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3006): Review code for process command injection vulnerabilities - -Potential process command injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3007](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3007): Review code for open redirect vulnerabilities - -Potential open redirect vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3008): Review code for XPath injection vulnerabilities - -Potential XPath injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3009](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3009): Review code for XML injection vulnerabilities - -Potential XML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3010](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3010): Review code for XAML injection vulnerabilities - -Potential XAML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3011](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3011): Review code for DLL injection vulnerabilities - -Potential DLL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3012](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3012): Review code for regex injection vulnerabilities - -Potential regex injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3061](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3061): Do Not Add Schema By URL - -This overload of XmlSchemaCollection.Add method internally enables DTD processing on the XML reader instance used, and uses UrlResolver for resolving external XML entities. The outcome is information disclosure. Content from file system or network shares for the machine processing the XML can be exposed to attacker. In addition, an attacker can use this as a DoS vector. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5350](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5350): Do Not Use Weak Cryptographic Algorithms - -Cryptographic algorithms degrade over time as attacks become for advances to attacker get access to more computation. Depending on the type and application of this cryptographic algorithm, further degradation of the cryptographic strength of it may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA-2 512, SHA-2 384, or SHA-2 256. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5351](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5351): Do Not Use Broken Cryptographic Algorithms - -An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5358](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5358): Review cipher mode usage with cryptography experts - -These cipher modes might be vulnerable to attacks. Consider using recommended modes (CBC, CTS). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5359](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5359): Do Not Disable Certificate Validation - -A certificate can help authenticate the identity of the server. Clients should validate the server certificate to ensure requests are sent to the intended server. If the ServerCertificateValidationCallback always returns 'true', any certificate will pass validation. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5360](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5360): Do Not Call Dangerous Methods In Deserialization - -Insecure Deserialization is a vulnerability which occurs when untrusted data is used to abuse the logic of an application, inflict a Denial-of-Service (DoS) attack, or even execute arbitrary code upon it being deserialized. It’s frequently possible for malicious users to abuse these deserialization features when the application is deserializing untrusted data which is under their control. Specifically, invoke dangerous methods in the process of deserialization. Successful insecure deserialization attacks could allow an attacker to carry out attacks such as DoS attacks, authentication bypasses, and remote code execution. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5361](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5361): Do Not Disable SChannel Use of Strong Crypto - -Starting with the .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes are recommended to use new protocols. The old ones have protocol weaknesses and are not supported. Setting Switch.System.Net.DontEnableSchUseStrongCrypto with true will use the old weak crypto check and opt out of the protocol migration. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5362](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5362): Potential reference cycle in deserialized object graph - -Review code that processes untrusted deserialized data for handling of unexpected reference cycles. An unexpected reference cycle should not cause the code to enter an infinite loop. Otherwise, an unexpected reference cycle can allow an attacker to DOS or exhaust the memory of the process when deserializing untrusted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5363](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5363): Do Not Disable Request Validation - -Request validation is a feature in ASP.NET that examines HTTP requests and determines whether they contain potentially dangerous content. This check adds protection from markup or code in the URL query string, cookies, or posted form values that might have been added for malicious purposes. So, it is generally desirable and should be left enabled for defense in depth. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5364](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5364): Do Not Use Deprecated Security Protocols - -Using a deprecated security protocol rather than the system default is risky. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5365](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5365): Do Not Disable HTTP Header Checking - -HTTP header checking enables encoding of the carriage return and newline characters, \r and \n, that are found in response headers. This encoding can help to avoid injection attacks that exploit an application that echoes untrusted data contained by the header. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5366](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5366): Use XmlReader for 'DataSet.ReadXml()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5367](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5367): Do Not Serialize Types With Pointer Fields - -Pointers are not "type safe" in the sense that you cannot guarantee the correctness of the memory they point at. So, serializing types with pointer fields is dangerous, as it may allow an attacker to control the pointer. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5368](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5368): Set ViewStateUserKey For Classes Derived From Page - -Setting the ViewStateUserKey property can help you prevent attacks on your application by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. Otherwise, there will be cross-site request forgery vulnerabilities. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5369](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5369): Use XmlReader for 'XmlSerializer.Deserialize()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5370](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5370): Use XmlReader for XmlValidatingReader constructor - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5371](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5371): Use XmlReader for 'XmlSchema.Read()' - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5372](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5372): Use XmlReader for XPathDocument constructor - -Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5373](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5373): Do not use obsolete key derivation function - -Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5374](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5374): Do Not Use XslTransform - -Do not use XslTransform. It does not restrict potentially dangerous external references. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5375](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5375): Do Not Use Account Shared Access Signature - -Shared Access Signatures(SAS) are a vital part of the security model for any application using Azure Storage, they should provide limited and safe permissions to your storage account to clients that don't have the account key. All of the operations available via a service SAS are also available via an account SAS, that is, account SAS is too powerful. So it is recommended to use Service SAS to delegate access more carefully. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5376](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5376): Use SharedAccessProtocol HttpsOnly - -HTTPS encrypts network traffic. Use HttpsOnly, rather than HttpOrHttps, to ensure network traffic is always encrypted to help prevent disclosure of sensitive data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5377](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5377): Use Container Level Access Policy - -No access policy identifier is specified, making tokens non-revocable. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5378](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5378): Do not disable ServicePointManagerSecurityProtocols - -Do not set Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols to true. Setting this switch limits Windows Communication Framework (WCF) to using Transport Layer Security (TLS) 1.0, which is insecure and obsolete. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5379](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5379): Ensure Key Derivation Function algorithm is sufficiently strong - -Some implementations of the Rfc2898DeriveBytes class allow for a hash algorithm to be specified in a constructor parameter or overwritten in the HashAlgorithm property. If a hash algorithm is specified, then it should be SHA-256 or higher. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5380](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5380): Do Not Add Certificates To Root Store - -By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5381](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5381): Ensure Certificates Are Not Added To Root Store - -By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5382](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5382): Use Secure Cookies In ASP.Net Core - -Applications available over HTTPS must use secure cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5383](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5383): Ensure Use Secure Cookies In ASP.Net Core - -Applications available over HTTPS must use secure cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5384](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5384): Do Not Use Digital Signature Algorithm (DSA) - -DSA is too weak to use. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5385](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5385): Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size - -Encryption algorithms are vulnerable to brute force attacks when too small a key size is used. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5386](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5386): Avoid hardcoding SecurityProtocolType value - -Avoid hardcoding SecurityProtocolType {0}, and instead use SecurityProtocolType.SystemDefault to allow the operating system to choose the best Transport Layer Security protocol to use. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5387](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5387): Do Not Use Weak Key Derivation Function With Insufficient Iteration Count - -When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5388](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5388): Ensure Sufficient Iteration Count When Using Weak Key Derivation Function - -When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k). - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5389](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5389): Do Not Add Archive Item's Path To The Target File System Path - -When extracting files from an archive and using the archive item's path, check if the path is safe. Archive path can be relative and can lead to file system access outside of the expected file system target path, leading to malicious config changes and remote code execution via lay-and-wait technique. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5390](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5390): Do not hard-code encryption key - -SymmetricAlgorithm's .Key property, or a method's rgbKey parameter, should never be a hard-coded value. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5391](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5391): Use antiforgery tokens in ASP.NET Core MVC controllers - -Handling a POST, PUT, PATCH, or DELETE request without validating an antiforgery token may be vulnerable to cross-site request forgery attacks. A cross-site request forgery attack can send malicious requests from an authenticated user to your ASP.NET Core MVC controller. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5392](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5392): Use DefaultDllImportSearchPaths attribute for P/Invokes - -By default, P/Invokes using DllImportAttribute probe a number of directories, including the current working directory for the library to load. This can be a security issue for certain applications, leading to DLL hijacking. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5393](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5393): Do not use unsafe DllImportSearchPath value - -There could be a malicious DLL in the default DLL search directories. Or, depending on where your application is run from, there could be a malicious DLL in the application's directory. Use a DllImportSearchPath value that specifies an explicit search path instead. The DllImportSearchPath flags that this rule looks for can be configured in .editorconfig. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5394](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394): Do not use insecure randomness - -Using a cryptographically weak pseudo-random number generator may allow an attacker to predict what security-sensitive value will be generated. Use a cryptographically strong random number generator if an unpredictable value is required, or ensure that weak pseudo-random numbers aren't used in a security-sensitive manner. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5395](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5395): Miss HttpVerb attribute for action methods - -All the methods that create, edit, delete, or otherwise modify data do so in the [HttpPost] overload of the method, which needs to be protected with the anti forgery attribute from request forgery. Performing a GET operation should be a safe operation that has no side effects and doesn't modify your persisted data. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5396](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5396): Set HttpOnly to true for HttpCookie - -As a defense in depth measure, ensure security sensitive HTTP cookies are marked as HttpOnly. This indicates web browsers should disallow scripts from accessing the cookies. Injected malicious scripts are a common way of stealing cookies. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5397](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5397): Do not use deprecated SslProtocols values - -Older protocol versions of Transport Layer Security (TLS) are less secure than TLS 1.2 and TLS 1.3, and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5398](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5398): Avoid hardcoded SslProtocols values - -Current Transport Layer Security protocol versions may become deprecated if vulnerabilities are found. Avoid hardcoding SslProtocols values to keep your application secure. Use 'None' to let the Operating System choose a version. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5399](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5399): HttpClients should enable certificate revocation list checks - -Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5400](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5400): Ensure HttpClient certificate revocation list check is not disabled - -Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5401](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5401): Do not use CreateEncryptor with non-default IV - -Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5402](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5402): Use CreateEncryptor with the default IV - -Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA5403](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5403): Do not hard-code certificate - -Hard-coded certificates in source code are vulnerable to being exploited. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|False| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA9998](https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers): Analyzer package has been deprecated - -FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [IL3000](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000): Avoid using accessing Assembly file path when publishing as a single-file - -'{0}' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'. - -|Item|Value| -|-|-| -|Category|Publish| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [IL3001](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001): Avoid using accessing Assembly file path when publishing as a single-file - -'{0}' will throw for assemblies embedded in a single-file app - -|Item|Value| -|-|-| -|Category|Publish| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- diff --git a/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.sarif b/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.sarif deleted file mode 100644 index 849cfe5156..0000000000 --- a/src/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.sarif +++ /dev/null @@ -1,3061 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/sarif-1.0.0", - "version": "1.0.0", - "runs": [ - { - "tool": { - "name": "Microsoft.NetCore.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1303": { - "id": "CA1303", - "shortDescription": "Do not pass literals as localized parameters", - "fullDescription": "A method passes a string literal as a parameter to a constructor or method in the .NET Framework class library and that string should be localizable. To fix a violation of this rule, replace the string literal with a string retrieved through an instance of the ResourceManager class.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1303", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "DoNotPassLiteralsAsLocalizedParameters", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1304": { - "id": "CA1304", - "shortDescription": "Specify CultureInfo", - "fullDescription": "A method or constructor calls a member that has an overload that accepts a System.Globalization.CultureInfo parameter, and the method or constructor does not call the overload that takes the CultureInfo parameter. When a CultureInfo or System.IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'CultureInfo' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1304", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyCultureInfoAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1305": { - "id": "CA1305", - "shortDescription": "Specify IFormatProvider", - "fullDescription": "A method or constructor calls one or more members that have overloads that accept a System.IFormatProvider parameter, and the method or constructor does not call the overload that takes the IFormatProvider parameter. When a System.Globalization.CultureInfo or IFormatProvider object is not supplied, the default value that is supplied by the overloaded member might not have the effect that you want in all locales. If the result will be based on the input from/output displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider'. Otherwise, if the result will be stored and accessed by software, such as when it is loaded from disk/database and when it is persisted to disk/database, specify 'CultureInfo.InvariantCulture'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1305", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyIFormatProviderAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1307": { - "id": "CA1307", - "shortDescription": "Specify StringComparison for clarity", - "fullDescription": "A string comparison operation uses a method overload that does not set a StringComparison parameter. It is recommended to use the overload with StringComparison parameter for clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1307", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "SpecifyStringComparisonAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1308": { - "id": "CA1308", - "shortDescription": "Normalize strings to uppercase", - "fullDescription": "Strings should be normalized to uppercase. A small group of characters cannot make a round trip when they are converted to lowercase. To make a round trip means to convert the characters from one locale to another locale that represents character data differently, and then to accurately retrieve the original characters from the converted characters.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1308", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "NormalizeStringsToUppercaseAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1310": { - "id": "CA1310", - "shortDescription": "Specify StringComparison for correctness", - "fullDescription": "A string comparison operation uses a method overload that does not set a StringComparison parameter, hence its behavior could vary based on the current user's locale settings. It is strongly recommended to use the overload with StringComparison parameter for correctness and clarity of intent. If the result will be displayed to the user, such as when sorting a list of items for display in a list box, specify 'StringComparison.CurrentCulture' or 'StringComparison.CurrentCultureIgnoreCase' as the 'StringComparison' parameter. If comparing case-insensitive identifiers, such as file paths, environment variables, or registry keys and values, specify 'StringComparison.OrdinalIgnoreCase'. Otherwise, if comparing case-sensitive identifiers, specify 'StringComparison.Ordinal'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1310", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "SpecifyStringComparisonAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1401": { - "id": "CA1401", - "shortDescription": "P/Invokes should not be visible", - "fullDescription": "A public or protected method in a public type has the System.Runtime.InteropServices.DllImportAttribute attribute (also implemented by the Declare keyword in Visual Basic). Such methods should not be exposed.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1401", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "PInvokeDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1416": { - "id": "CA1416", - "shortDescription": "Validate platform compatibility", - "fullDescription": "Using platform dependent API on a component makes the code no longer work across all platforms.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "PlatformCompatibilityAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1417": { - "id": "CA1417", - "shortDescription": "Do not use 'OutAttribute' on string parameters for P/Invokes", - "fullDescription": "String parameters passed by value with the 'OutAttribute' can destabilize the runtime if the string is an interned string.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1417", - "properties": { - "category": "Interoperability", - "isEnabledByDefault": true, - "typeName": "DoNotUseOutAttributeStringPInvokeParametersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1810": { - "id": "CA1810", - "shortDescription": "Initialize reference type static fields inline", - "fullDescription": "A reference type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "InitializeStaticFieldsInlineAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1813": { - "id": "CA1813", - "shortDescription": "Avoid unsealed attributes", - "fullDescription": "The .NET Framework class library provides methods for retrieving custom attributes. By default, these methods search the attribute inheritance hierarchy. Sealing the attribute eliminates the search through the inheritance hierarchy and can improve performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1813", - "properties": { - "category": "Performance", - "isEnabledByDefault": false, - "typeName": "AvoidUnsealedAttributesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1816": { - "id": "CA1816", - "shortDescription": "Dispose methods should call SuppressFinalize", - "fullDescription": "A method that is an implementation of Dispose does not call GC.SuppressFinalize; or a method that is not an implementation of Dispose calls GC.SuppressFinalize; or a method calls GC.SuppressFinalize and passes something other than this (Me in Visual Basic).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1816", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "CallGCSuppressFinalizeCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1820": { - "id": "CA1820", - "shortDescription": "Test for empty strings using string length", - "fullDescription": "Comparing strings by using the String.Length property or the String.IsNullOrEmpty method is significantly faster than using Equals.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1820", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "TestForEmptyStringsUsingStringLengthAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1826": { - "id": "CA1826", - "shortDescription": "Do not use Enumerable methods on indexable collections", - "fullDescription": "This collection is directly indexable. Going through LINQ here causes unnecessary allocations and CPU work.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1826", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1827": { - "id": "CA1827", - "shortDescription": "Do not use Count() or LongCount() when Any() can be used", - "fullDescription": "For non-empty collections, Count() and LongCount() enumerate the entire sequence, while Any() stops at the first item or the first item that satisfies a condition.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1827", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1828": { - "id": "CA1828", - "shortDescription": "Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used", - "fullDescription": "For non-empty collections, CountAsync() and LongCountAsync() enumerate the entire sequence, while AnyAsync() stops at the first item or the first item that satisfies a condition.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1828", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1829": { - "id": "CA1829", - "shortDescription": "Use Length/Count property instead of Count() when available", - "fullDescription": "Enumerable.Count() potentially enumerates the sequence while a Length/Count property is a direct access.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1829", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1830": { - "id": "CA1830", - "shortDescription": "Prefer strongly-typed Append and Insert method overloads on StringBuilder", - "fullDescription": "StringBuilder.Append and StringBuilder.Insert provide overloads for multiple types beyond System.String. When possible, prefer the strongly-typed overloads over using ToString() and the string-based overload.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1830", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferTypedStringBuilderAppendOverloads", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1831": { - "id": "CA1831", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on string values produces a copy of requested portion of the string. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1831", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1832": { - "id": "CA1832", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on array values produces a copy of requested portion of the array. This copy is usually unnecessary when it is implicitly used as a ReadOnlySpan or ReadOnlyMemory value. Use the AsSpan method to avoid the unnecessary copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1832", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1833": { - "id": "CA1833", - "shortDescription": "Use AsSpan or AsMemory instead of Range-based indexers when appropriate", - "fullDescription": "The Range-based indexer on array values produces a copy of requested portion of the array. This copy is often unwanted when it is implicitly used as a Span or Memory value. Use the AsSpan method to avoid the copy.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1833", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseAsSpanInsteadOfRangeIndexerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1834": { - "id": "CA1834", - "shortDescription": "Consider using 'StringBuilder.Append(char)' when applicable", - "fullDescription": "'StringBuilder.Append(char)' is more efficient than 'StringBuilder.Append(string)' when the string is a single character. When calling 'Append' with a constant, prefer using a constant char rather than a constant string containing one character.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1834", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferConstCharOverConstUnitStringAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1835": { - "id": "CA1835", - "shortDescription": "Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'", - "fullDescription": "'Stream' has a 'ReadAsync' overload that takes a 'Memory' as the first argument, and a 'WriteAsync' overload that takes a 'ReadOnlyMemory' as the first argument. Prefer calling the memory based overloads, which are more efficient.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1835", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "PreferStreamAsyncMemoryOverloads", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1836": { - "id": "CA1836", - "shortDescription": "Prefer IsEmpty over Count", - "fullDescription": "For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1836", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseCountProperlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1837": { - "id": "CA1837", - "shortDescription": "Use 'Environment.ProcessId'", - "fullDescription": "'Environment.ProcessId' is simpler and faster than 'Process.GetCurrentProcess().Id'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1837", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "UseEnvironmentProcessId", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1838": { - "id": "CA1838", - "shortDescription": "Avoid 'StringBuilder' parameters for P/Invokes", - "fullDescription": "Marshalling of 'StringBuilder' always creates a native buffer copy, resulting in multiple allocations for one marshalling operation.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1838", - "properties": { - "category": "Performance", - "isEnabledByDefault": false, - "typeName": "AvoidStringBuilderPInvokeParametersAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2000": { - "id": "CA2000", - "shortDescription": "Dispose objects before losing scope", - "fullDescription": "If a disposable object is not explicitly disposed before all references to it are out of scope, the object will be disposed at some indeterminate time when the garbage collector runs the finalizer of the object. Because an exceptional event might occur that will prevent the finalizer of the object from running, the object should be explicitly disposed instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2000", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DisposeObjectsBeforeLosingScope", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2002": { - "id": "CA2002", - "shortDescription": "Do not lock on objects with weak identity", - "fullDescription": "An object is said to have a weak identity when it can be directly accessed across application domain boundaries. A thread that tries to acquire a lock on an object that has a weak identity can be blocked by a second thread in a different application domain that has a lock on the same object.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2002", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotLockOnObjectsWithWeakIdentityAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2008": { - "id": "CA2008", - "shortDescription": "Do not create tasks without passing a TaskScheduler", - "fullDescription": "Do not create tasks unless you are using one of the overloads that takes a TaskScheduler. The default is to schedule on TaskScheduler.Current, which would lead to deadlocks. Either use TaskScheduler.Default to schedule on the thread pool, or explicitly pass TaskScheduler.Current to make your intentions clear.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2008", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotCreateTasksWithoutPassingATaskSchedulerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2009": { - "id": "CA2009", - "shortDescription": "Do not call ToImmutableCollection on an ImmutableCollection value", - "fullDescription": "Do not call {0} on an {1} value", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2009", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotCallToImmutableCollectionOnAnImmutableCollectionValueAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2012": { - "id": "CA2012", - "shortDescription": "Use ValueTasks correctly", - "fullDescription": "ValueTasks returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2012", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "UseValueTasksCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2013": { - "id": "CA2013", - "shortDescription": "Do not use ReferenceEquals with value types", - "fullDescription": "Value type typed arguments are uniquely boxed for each call to this method, therefore the result is always false.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2013", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotUseReferenceEqualsWithValueTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2014": { - "id": "CA2014", - "shortDescription": "Do not use stackalloc in loops", - "fullDescription": "Stack space allocated by a stackalloc is only released at the end of the current method's invocation. Using it in a loop can result in unbounded stack growth and eventual stack overflow conditions.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2014", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotUseStackallocInLoopsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2015": { - "id": "CA2015", - "shortDescription": "Do not define finalizers for types derived from MemoryManager", - "fullDescription": "Adding a finalizer to a type derived from MemoryManager may permit memory to be freed while it is still in use by a Span.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2015", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DoNotDefineFinalizersForTypesDerivedFromMemoryManager", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2100": { - "id": "CA2100", - "shortDescription": "Review SQL queries for security vulnerabilities", - "fullDescription": "SQL queries that directly use user input can be vulnerable to SQL injection attacks. Review this SQL query for potential vulnerabilities, and consider using a parameterized SQL query.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2100", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "ReviewSqlQueriesForSecurityVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2101": { - "id": "CA2101", - "shortDescription": "Specify marshaling for P/Invoke string arguments", - "fullDescription": "A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2101", - "properties": { - "category": "Globalization", - "isEnabledByDefault": true, - "typeName": "PInvokeDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2201": { - "id": "CA2201", - "shortDescription": "Do not raise reserved exception types", - "fullDescription": "An exception of type that is not sufficiently specific or reserved by the runtime should never be raised by user code. This makes the original error difficult to detect and debug. If this exception instance might be thrown, use a different exception type.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2201", - "properties": { - "category": "Usage", - "isEnabledByDefault": false, - "typeName": "DoNotRaiseReservedExceptionTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2207": { - "id": "CA2207", - "shortDescription": "Initialize value type static fields inline", - "fullDescription": "A value type declares an explicit static constructor. To fix a violation of this rule, initialize all static data when it is declared and remove the static constructor.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2207", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "InitializeStaticFieldsInlineAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2208": { - "id": "CA2208", - "shortDescription": "Instantiate argument exceptions correctly", - "fullDescription": "A call is made to the default (parameterless) constructor of an exception type that is or derives from ArgumentException, or an incorrect string argument is passed to a parameterized constructor of an exception type that is or derives from ArgumentException.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2208", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "InstantiateArgumentExceptionsCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2213": { - "id": "CA2213", - "shortDescription": "Disposable fields should be disposed", - "fullDescription": "A type that implements System.IDisposable declares fields that are of types that also implement IDisposable. The Dispose method of the field is not called by the Dispose method of the declaring type. To fix a violation of this rule, call Dispose on fields that are of types that implement IDisposable if you are responsible for allocating and releasing the unmanaged resources held by the field.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2213", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposableFieldsShouldBeDisposed", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2215": { - "id": "CA2215", - "shortDescription": "Dispose methods should call base class dispose", - "fullDescription": "A type that implements System.IDisposable inherits from a type that also implements IDisposable. The Dispose method of the inheriting type does not call the Dispose method of the parent type. To fix a violation of this rule, call base.Dispose in your Dispose method.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2215", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposeMethodsShouldCallBaseClassDispose", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2216": { - "id": "CA2216", - "shortDescription": "Disposable types should declare finalizer", - "fullDescription": "A type that implements System.IDisposable and has fields that suggest the use of unmanaged resources does not implement a finalizer, as described by Object.Finalize.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2216", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DisposableTypesShouldDeclareFinalizerAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2229": { - "id": "CA2229", - "shortDescription": "Implement serialization constructors", - "fullDescription": "To fix a violation of this rule, implement the serialization constructor. For a sealed class, make the constructor private; otherwise, make it protected.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2229", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2235": { - "id": "CA2235", - "shortDescription": "Mark all non-serializable fields", - "fullDescription": "An instance field of a type that is not serializable is declared in a type that is serializable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2235", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2237": { - "id": "CA2237", - "shortDescription": "Mark ISerializable types with serializable", - "fullDescription": "To be recognized by the common language runtime as serializable, types must be marked by using the SerializableAttribute attribute even when the type uses a custom serialization routine through implementation of the ISerializable interface.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2237", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "SerializationRulesDiagnosticAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2241": { - "id": "CA2241", - "shortDescription": "Provide correct arguments to formatting methods", - "fullDescription": "The format argument that is passed to System.String.Format does not contain a format item that corresponds to each object argument, or vice versa.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2241", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "ProvideCorrectArgumentsToFormattingMethodsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2242": { - "id": "CA2242", - "shortDescription": "Test for NaN correctly", - "fullDescription": "This expression tests a value against Single.Nan or Double.Nan. Use Single.IsNan(Single) or Double.IsNan(Double) to test the value.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2242", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "TestForNaNCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2243": { - "id": "CA2243", - "shortDescription": "Attribute string literals should parse correctly", - "fullDescription": "The string literal parameter of an attribute does not parse correctly for a URL, a GUID, or a version.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2243", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "AttributeStringLiteralsShouldParseCorrectlyAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2247": { - "id": "CA2247", - "shortDescription": "Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum", - "fullDescription": "TaskCompletionSource has constructors that take TaskCreationOptions that control the underlying Task, and constructors that take object state that's stored in the task. Accidentally passing a TaskContinuationOptions instead of a TaskCreationOptions will result in the call treating the options as state.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2247", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "DoNotCreateTaskCompletionSourceWithWrongArguments", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2248": { - "id": "CA2248", - "shortDescription": "Provide correct 'enum' argument to 'Enum.HasFlag'", - "fullDescription": "'Enum.HasFlag' method expects the 'enum' argument to be of the same 'enum' type as the instance on which the method is invoked and that this 'enum' is marked with 'System.FlagsAttribute'. If these are different 'enum' types, an unhandled exception will be thrown at runtime. If the 'enum' type is not marked with 'System.FlagsAttribute' the call will always return 'false' at runtime.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2248", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "ProvideCorrectArgumentToEnumHasFlag", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2249": { - "id": "CA2249", - "shortDescription": "Consider using 'string.Contains' instead of 'string.IndexOf'", - "fullDescription": "Calls to 'string.IndexOf' where the result is used to check for the presence/absence of a substring can be replaced by 'string.Contains'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2249", - "properties": { - "category": "Usage", - "isEnabledByDefault": true, - "typeName": "PreferStringContainsOverIndexOfAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2300": { - "id": "CA2300", - "shortDescription": "Do not use insecure deserializer BinaryFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect BinaryFormatter deserialization without a SerializationBinder set, then disable rule CA2300, and enable rules CA2301 and CA2302.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2300", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2301": { - "id": "CA2301", - "shortDescription": "Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2301", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2302": { - "id": "CA2302", - "shortDescription": "Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2302", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerBinaryFormatterWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2305": { - "id": "CA2305", - "shortDescription": "Do not use insecure deserializer LosFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2305", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerLosFormatter", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2310": { - "id": "CA2310", - "shortDescription": "Do not use insecure deserializer NetDataContractSerializer", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. If you need to instead detect NetDataContractSerializer deserialization without a SerializationBinder set, then disable rule CA2310, and enable rules CA2311 and CA2312.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2310", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerMethods", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2311": { - "id": "CA2311", - "shortDescription": "Do not deserialize without first setting NetDataContractSerializer.Binder", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2311", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2312": { - "id": "CA2312", - "shortDescription": "Ensure NetDataContractSerializer.Binder is set before deserializing", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data without a SerializationBinder to restrict the type of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2312", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerNetDataContractSerializerWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2315": { - "id": "CA2315", - "shortDescription": "Do not use insecure deserializer ObjectStateFormatter", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2315", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerObjectStateFormatter", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2321": { - "id": "CA2321", - "shortDescription": "Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Initialize JavaScriptSerializer without a JavaScriptTypeResolver specified, or initialize with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2321", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2322": { - "id": "CA2322", - "shortDescription": "Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data with a JavaScriptSerializer initialized with a SimpleTypeResolver. Ensure that the JavaScriptSerializer is initialized without a JavaScriptTypeResolver specified, or initialized with a JavaScriptTypeResolver that limits the types of objects in the deserialized object graph.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2322", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJavaScriptSerializerWithSimpleTypeResolver", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2326": { - "id": "CA2326", - "shortDescription": "Do not use TypeNameHandling values other than None", - "fullDescription": "Deserializing JSON when using a TypeNameHandling value other than None can be insecure. If you need to instead detect Json.NET deserialization when a SerializationBinder isn't specified, then disable rule CA2326, and enable rules CA2327, CA2328, CA2329, and CA2330.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2326", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "JsonNetTypeNameHandling", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2327": { - "id": "CA2327", - "shortDescription": "Do not use insecure JsonSerializerSettings", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2327", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureSettingsForJsonNet", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2328": { - "id": "CA2328", - "shortDescription": "Ensure that JsonSerializerSettings are secure", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using JsonSerializerSettings, ensure TypeNameHandling.None is specified, or for values other than None, ensure a SerializationBinder is specified to restrict deserialized types.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2328", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureSettingsForJsonNet", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2329": { - "id": "CA2329", - "shortDescription": "Do not deserialize with JsonSerializer using an insecure configuration", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2329", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2330": { - "id": "CA2330", - "shortDescription": "Ensure that JsonSerializer has a secure configuration when deserializing", - "fullDescription": "When deserializing untrusted input, allowing arbitrary types to be deserialized is insecure. When using deserializing JsonSerializer, use TypeNameHandling.None, or for values other than None, restrict deserialized types with a SerializationBinder.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2330", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureDeserializerJsonNetWithoutBinder", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA2350": { - "id": "CA2350", - "shortDescription": "Do not use DataTable.ReadXml() with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2350", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataTableReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2351": { - "id": "CA2351", - "shortDescription": "Do not use DataSet.ReadXml() with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2351", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2352": { - "id": "CA2352", - "shortDescription": "Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2352", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2353": { - "id": "CA2353", - "shortDescription": "Unsafe DataSet or DataTable in serializable type", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2353", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2354": { - "id": "CA2354", - "shortDescription": "Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2354", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInIFormatterSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2355": { - "id": "CA2355", - "shortDescription": "Unsafe DataSet or DataTable type found in deserializable object graph", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2355", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2356": { - "id": "CA2356", - "shortDescription": "Unsafe DataSet or DataTable type in web deserializable object graph", - "fullDescription": "When deserializing untrusted input, deserializing a {0} object is insecure. '{1}' either is or derives from {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2356", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInWebSerializableObjectGraphAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2361": { - "id": "CA2361", - "shortDescription": "Ensure auto-generated class containing DataSet.ReadXml() is not used with untrusted data", - "fullDescription": "The method '{0}' is insecure when deserializing untrusted data. Make sure that auto-generated class containing the '{0}' call is not deserialized with untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2361", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2362": { - "id": "CA2362", - "shortDescription": "Unsafe DataSet or DataTable in auto-generated serializable type can be vulnerable to remote code execution attacks", - "fullDescription": "When deserializing untrusted input with an IFormatter-based serializer, deserializing a {0} object is insecure. '{1}' either is or derives from {0}. Ensure that the auto-generated type is never deserialized with untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2362", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DataSetDataTableInSerializableTypeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3001": { - "id": "CA3001", - "shortDescription": "Review code for SQL injection vulnerabilities", - "fullDescription": "Potential SQL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3001", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForSqlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3002": { - "id": "CA3002", - "shortDescription": "Review code for XSS vulnerabilities", - "fullDescription": "Potential cross-site scripting (XSS) vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3002", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXssVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3003": { - "id": "CA3003", - "shortDescription": "Review code for file path injection vulnerabilities", - "fullDescription": "Potential file path injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3003", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForFilePathInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3004": { - "id": "CA3004", - "shortDescription": "Review code for information disclosure vulnerabilities", - "fullDescription": "Potential information disclosure vulnerability was found where '{0}' in method '{1}' may contain unintended information from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3004", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForInformationDisclosureVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3005": { - "id": "CA3005", - "shortDescription": "Review code for LDAP injection vulnerabilities", - "fullDescription": "Potential LDAP injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3005", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForLdapInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3006": { - "id": "CA3006", - "shortDescription": "Review code for process command injection vulnerabilities", - "fullDescription": "Potential process command injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3006", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForCommandExecutionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3007": { - "id": "CA3007", - "shortDescription": "Review code for open redirect vulnerabilities", - "fullDescription": "Potential open redirect vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3007", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForOpenRedirectVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3008": { - "id": "CA3008", - "shortDescription": "Review code for XPath injection vulnerabilities", - "fullDescription": "Potential XPath injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3008", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXPathInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3009": { - "id": "CA3009", - "shortDescription": "Review code for XML injection vulnerabilities", - "fullDescription": "Potential XML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3009", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXmlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3010": { - "id": "CA3010", - "shortDescription": "Review code for XAML injection vulnerabilities", - "fullDescription": "Potential XAML injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3010", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForXamlInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3011": { - "id": "CA3011", - "shortDescription": "Review code for DLL injection vulnerabilities", - "fullDescription": "Potential DLL injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3011", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForDllInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3012": { - "id": "CA3012", - "shortDescription": "Review code for regex injection vulnerabilities", - "fullDescription": "Potential regex injection vulnerability was found where '{0}' in method '{1}' may be tainted by user-controlled data from '{2}' in method '{3}'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3012", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ReviewCodeForRegexInjectionVulnerabilities", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3061": { - "id": "CA3061", - "shortDescription": "Do Not Add Schema By URL", - "fullDescription": "This overload of XmlSchemaCollection.Add method internally enables DTD processing on the XML reader instance used, and uses UrlResolver for resolving external XML entities. The outcome is information disclosure. Content from file system or network shares for the machine processing the XML can be exposed to attacker. In addition, an attacker can use this as a DoS vector.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3061", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotAddSchemaByURL", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5350": { - "id": "CA5350", - "shortDescription": "Do Not Use Weak Cryptographic Algorithms", - "fullDescription": "Cryptographic algorithms degrade over time as attacks become for advances to attacker get access to more computation. Depending on the type and application of this cryptographic algorithm, further degradation of the cryptographic strength of it may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA-2 512, SHA-2 384, or SHA-2 256.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5350", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5351": { - "id": "CA5351", - "shortDescription": "Do Not Use Broken Cryptographic Algorithms", - "fullDescription": "An attack making it computationally feasible to break this algorithm exists. This allows attackers to break the cryptographic guarantees it is designed to provide. Depending on the type and application of this cryptographic algorithm, this may allow attackers to read enciphered messages, tamper with enciphered  messages, forge digital signatures, tamper with hashed content, or otherwise compromise any cryptosystem based on this algorithm. Replace encryption uses with the AES algorithm (AES-256, AES-192 and AES-128 are acceptable) with a key length greater than or equal to 128 bits. Replace hashing uses with a hashing function in the SHA-2 family, such as SHA512, SHA384, or SHA256. Replace digital signature uses with RSA with a key length greater than or equal to 2048-bits, or ECDSA with a key length greater than or equal to 256 bits.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5351", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureCryptographicAlgorithmsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5358": { - "id": "CA5358", - "shortDescription": "Review cipher mode usage with cryptography experts", - "fullDescription": "These cipher modes might be vulnerable to attacks. Consider using recommended modes (CBC, CTS).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5358", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "ApprovedCipherModeAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5359": { - "id": "CA5359", - "shortDescription": "Do Not Disable Certificate Validation", - "fullDescription": "A certificate can help authenticate the identity of the server. Clients should validate the server certificate to ensure requests are sent to the intended server. If the ServerCertificateValidationCallback always returns 'true', any certificate will pass validation.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5359", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableCertificateValidation", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5360": { - "id": "CA5360", - "shortDescription": "Do Not Call Dangerous Methods In Deserialization", - "fullDescription": "Insecure Deserialization is a vulnerability which occurs when untrusted data is used to abuse the logic of an application, inflict a Denial-of-Service (DoS) attack, or even execute arbitrary code upon it being deserialized. It’s frequently possible for malicious users to abuse these deserialization features when the application is deserializing untrusted data which is under their control. Specifically, invoke dangerous methods in the process of deserialization. Successful insecure deserialization attacks could allow an attacker to carry out attacks such as DoS attacks, authentication bypasses, and remote code execution.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5360", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotCallDangerousMethodsInDeserialization", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5361": { - "id": "CA5361", - "shortDescription": "Do Not Disable SChannel Use of Strong Crypto", - "fullDescription": "Starting with the .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes are recommended to use new protocols. The old ones have protocol weaknesses and are not supported. Setting Switch.System.Net.DontEnableSchUseStrongCrypto with true will use the old weak crypto check and opt out of the protocol migration.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5361", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSetSwitch", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5362": { - "id": "CA5362", - "shortDescription": "Potential reference cycle in deserialized object graph", - "fullDescription": "Review code that processes untrusted deserialized data for handling of unexpected reference cycles. An unexpected reference cycle should not cause the code to enter an infinite loop. Otherwise, an unexpected reference cycle can allow an attacker to DOS or exhaust the memory of the process when deserializing untrusted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5362", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "PotentialReferenceCycleInDeserializedObjectGraph", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5363": { - "id": "CA5363", - "shortDescription": "Do Not Disable Request Validation", - "fullDescription": "Request validation is a feature in ASP.NET that examines HTTP requests and determines whether they contain potentially dangerous content. This check adds protection from markup or code in the URL query string, cookies, or posted form values that might have been added for malicious purposes. So, it is generally desirable and should be left enabled for defense in depth.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5363", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableRequestValidation", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5364": { - "id": "CA5364", - "shortDescription": "Do Not Use Deprecated Security Protocols", - "fullDescription": "Using a deprecated security protocol rather than the system default is risky.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5364", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseDeprecatedSecurityProtocols", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5365": { - "id": "CA5365", - "shortDescription": "Do Not Disable HTTP Header Checking", - "fullDescription": "HTTP header checking enables encoding of the carriage return and newline characters, \\r and \\n, that are found in response headers. This encoding can help to avoid injection attacks that exploit an application that echoes untrusted data contained by the header.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5365", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotDisableHTTPHeaderChecking", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5366": { - "id": "CA5366", - "shortDescription": "Use XmlReader for 'DataSet.ReadXml()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5366", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForDataSetReadXml", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5367": { - "id": "CA5367", - "shortDescription": "Do Not Serialize Types With Pointer Fields", - "fullDescription": "Pointers are not \"type safe\" in the sense that you cannot guarantee the correctness of the memory they point at. So, serializing types with pointer fields is dangerous, as it may allow an attacker to control the pointer.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5367", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSerializeTypeWithPointerFields", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5368": { - "id": "CA5368", - "shortDescription": "Set ViewStateUserKey For Classes Derived From Page", - "fullDescription": "Setting the ViewStateUserKey property can help you prevent attacks on your application by allowing you to assign an identifier to the view-state variable for individual users so that they cannot use the variable to generate an attack. Otherwise, there will be cross-site request forgery vulnerabilities.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5368", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SetViewStateUserKey", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5369": { - "id": "CA5369", - "shortDescription": "Use XmlReader for 'XmlSerializer.Deserialize()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5369", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForDeserialize", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5370": { - "id": "CA5370", - "shortDescription": "Use XmlReader for XmlValidatingReader constructor", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5370", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForValidatingReader", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5371": { - "id": "CA5371", - "shortDescription": "Use XmlReader for 'XmlSchema.Read()'", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5371", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForSchemaRead", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5372": { - "id": "CA5372", - "shortDescription": "Use XmlReader for XPathDocument constructor", - "fullDescription": "Processing XML from untrusted data may load dangerous external references, which should be restricted by using an XmlReader with a secure resolver or with DTD processing disabled.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5372", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseXmlReaderForXPathDocument", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5373": { - "id": "CA5373", - "shortDescription": "Do not use obsolete key derivation function", - "fullDescription": "Password-based key derivation should use PBKDF2 with SHA-2. Avoid using PasswordDeriveBytes since it generates a PBKDF1 key. Avoid using Rfc2898DeriveBytes.CryptDeriveKey since it doesn't use the iteration count or salt.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5373", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseObsoleteKDFAlgorithm", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5374": { - "id": "CA5374", - "shortDescription": "Do Not Use XslTransform", - "fullDescription": "Do not use XslTransform. It does not restrict potentially dangerous external references.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5374", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseXslTransform", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5375": { - "id": "CA5375", - "shortDescription": "Do Not Use Account Shared Access Signature", - "fullDescription": "Shared Access Signatures(SAS) are a vital part of the security model for any application using Azure Storage, they should provide limited and safe permissions to your storage account to clients that don't have the account key. All of the operations available via a service SAS are also available via an account SAS, that is, account SAS is too powerful. So it is recommended to use Service SAS to delegate access more carefully.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5375", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseAccountSAS", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5376": { - "id": "CA5376", - "shortDescription": "Use SharedAccessProtocol HttpsOnly", - "fullDescription": "HTTPS encrypts network traffic. Use HttpsOnly, rather than HttpOrHttps, to ensure network traffic is always encrypted to help prevent disclosure of sensitive data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5376", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSharedAccessProtocolHttpsOnly", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5377": { - "id": "CA5377", - "shortDescription": "Use Container Level Access Policy", - "fullDescription": "No access policy identifier is specified, making tokens non-revocable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5377", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseContainerLevelAccessPolicy", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5378": { - "id": "CA5378", - "shortDescription": "Do not disable ServicePointManagerSecurityProtocols", - "fullDescription": "Do not set Switch.System.ServiceModel.DisableUsingServicePointManagerSecurityProtocols to true. Setting this switch limits Windows Communication Framework (WCF) to using Transport Layer Security (TLS) 1.0, which is insecure and obsolete.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5378", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotSetSwitch", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5379": { - "id": "CA5379", - "shortDescription": "Ensure Key Derivation Function algorithm is sufficiently strong", - "fullDescription": "Some implementations of the Rfc2898DeriveBytes class allow for a hash algorithm to be specified in a constructor parameter or overwritten in the HashAlgorithm property. If a hash algorithm is specified, then it should be SHA-256 or higher.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5379", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseWeakKDFAlgorithm", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5380": { - "id": "CA5380", - "shortDescription": "Do Not Add Certificates To Root Store", - "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5380", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotInstallRootCert", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5381": { - "id": "CA5381", - "shortDescription": "Ensure Certificates Are Not Added To Root Store", - "fullDescription": "By default, the Trusted Root Certification Authorities certificate store is configured with a set of public CAs that has met the requirements of the Microsoft Root Certificate Program. Since all trusted root CAs can issue certificates for any domain, an attacker can pick a weak or coercible CA that you install by yourself to target for an attack – and a single vulnerable, malicious or coercible CA undermines the security of the entire system. To make matters worse, these attacks can go unnoticed quite easily.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5381", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotInstallRootCert", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5382": { - "id": "CA5382", - "shortDescription": "Use Secure Cookies In ASP.Net Core", - "fullDescription": "Applications available over HTTPS must use secure cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5382", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSecureCookiesASPNetCore", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5383": { - "id": "CA5383", - "shortDescription": "Ensure Use Secure Cookies In ASP.Net Core", - "fullDescription": "Applications available over HTTPS must use secure cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5383", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseSecureCookiesASPNetCore", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5384": { - "id": "CA5384", - "shortDescription": "Do Not Use Digital Signature Algorithm (DSA)", - "fullDescription": "DSA is too weak to use.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5384", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseDSA", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5385": { - "id": "CA5385", - "shortDescription": "Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size", - "fullDescription": "Encryption algorithms are vulnerable to brute force attacks when too small a key size is used.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5385", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "UseRSAWithSufficientKeySize", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5386": { - "id": "CA5386", - "shortDescription": "Avoid hardcoding SecurityProtocolType value", - "fullDescription": "Avoid hardcoding SecurityProtocolType {0}, and instead use SecurityProtocolType.SystemDefault to allow the operating system to choose the best Transport Layer Security protocol to use.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5386", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseDeprecatedSecurityProtocols", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5387": { - "id": "CA5387", - "shortDescription": "Do Not Use Weak Key Derivation Function With Insufficient Iteration Count", - "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5387", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseWeakKDFInsufficientIterationCount", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5388": { - "id": "CA5388", - "shortDescription": "Ensure Sufficient Iteration Count When Using Weak Key Derivation Function", - "fullDescription": "When deriving cryptographic keys from user-provided inputs such as password, use sufficient iteration count (at least 100k).", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5388", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseWeakKDFInsufficientIterationCount", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5389": { - "id": "CA5389", - "shortDescription": "Do Not Add Archive Item's Path To The Target File System Path", - "fullDescription": "When extracting files from an archive and using the archive item's path, check if the path is safe. Archive path can be relative and can lead to file system access outside of the expected file system target path, leading to malicious config changes and remote code execution via lay-and-wait technique.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5389", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotAddArchiveItemPathToTheTargetFileSystemPath", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5390": { - "id": "CA5390", - "shortDescription": "Do not hard-code encryption key", - "fullDescription": "SymmetricAlgorithm's .Key property, or a method's rgbKey parameter, should never be a hard-coded value.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5390", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotHardCodeEncryptionKey", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5391": { - "id": "CA5391", - "shortDescription": "Use antiforgery tokens in ASP.NET Core MVC controllers", - "fullDescription": "Handling a POST, PUT, PATCH, or DELETE request without validating an antiforgery token may be vulnerable to cross-site request forgery attacks. A cross-site request forgery attack can send malicious requests from an authenticated user to your ASP.NET Core MVC controller.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5391", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseAutoValidateAntiforgeryToken", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5392": { - "id": "CA5392", - "shortDescription": "Use DefaultDllImportSearchPaths attribute for P/Invokes", - "fullDescription": "By default, P/Invokes using DllImportAttribute probe a number of directories, including the current working directory for the library to load. This can be a security issue for certain applications, leading to DLL hijacking.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5392", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseDefaultDllImportSearchPathsAttribute", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5393": { - "id": "CA5393", - "shortDescription": "Do not use unsafe DllImportSearchPath value", - "fullDescription": "There could be a malicious DLL in the default DLL search directories. Or, depending on where your application is run from, there could be a malicious DLL in the application's directory. Use a DllImportSearchPath value that specifies an explicit search path instead. The DllImportSearchPath flags that this rule looks for can be configured in .editorconfig.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5393", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseDefaultDllImportSearchPathsAttribute", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5394": { - "id": "CA5394", - "shortDescription": "Do not use insecure randomness", - "fullDescription": "Using a cryptographically weak pseudo-random number generator may allow an attacker to predict what security-sensitive value will be generated. Use a cryptographically strong random number generator if an unpredictable value is required, or ensure that weak pseudo-random numbers aren't used in a security-sensitive manner.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5394", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseInsecureRandomness", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5395": { - "id": "CA5395", - "shortDescription": "Miss HttpVerb attribute for action methods", - "fullDescription": "All the methods that create, edit, delete, or otherwise modify data do so in the [HttpPost] overload of the method, which needs to be protected with the anti forgery attribute from request forgery. Performing a GET operation should be a safe operation that has no side effects and doesn't modify your persisted data.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5395", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "UseAutoValidateAntiforgeryToken", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5396": { - "id": "CA5396", - "shortDescription": "Set HttpOnly to true for HttpCookie", - "fullDescription": "As a defense in depth measure, ensure security sensitive HTTP cookies are marked as HttpOnly. This indicates web browsers should disallow scripts from accessing the cookies. Injected malicious scripts are a common way of stealing cookies.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5396", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "SetHttpOnlyForHttpCookie", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5397": { - "id": "CA5397", - "shortDescription": "Do not use deprecated SslProtocols values", - "fullDescription": "Older protocol versions of Transport Layer Security (TLS) are less secure than TLS 1.2 and TLS 1.3, and are more likely to have new vulnerabilities. Avoid older protocol versions to minimize risk.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5397", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "SslProtocolsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5398": { - "id": "CA5398", - "shortDescription": "Avoid hardcoded SslProtocols values", - "fullDescription": "Current Transport Layer Security protocol versions may become deprecated if vulnerabilities are found. Avoid hardcoding SslProtocols values to keep your application secure. Use 'None' to let the Operating System choose a version.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5398", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "SslProtocolsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA5399": { - "id": "CA5399", - "shortDescription": "HttpClients should enable certificate revocation list checks", - "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5399", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotDisableHttpClientCRLCheck", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5400": { - "id": "CA5400", - "shortDescription": "Ensure HttpClient certificate revocation list check is not disabled", - "fullDescription": "Using HttpClient without providing a platform specific handler (WinHttpHandler or CurlHandler or HttpClientHandler) where the CheckCertificateRevocationList property is set to true, will allow revoked certificates to be accepted by the HttpClient as valid.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5400", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotDisableHttpClientCRLCheck", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5401": { - "id": "CA5401", - "shortDescription": "Do not use CreateEncryptor with non-default IV", - "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5401", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5402": { - "id": "CA5402", - "shortDescription": "Use CreateEncryptor with the default IV ", - "fullDescription": "Symmetric encryption should always use a non-repeatable initialization vector to prevent dictionary attacks.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5402", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotUseCreateEncryptorWithNonDefaultIV", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA5403": { - "id": "CA5403", - "shortDescription": "Do not hard-code certificate", - "fullDescription": "Hard-coded certificates in source code are vulnerable to being exploited.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca5403", - "properties": { - "category": "Security", - "isEnabledByDefault": false, - "typeName": "DoNotHardCodeCertificate", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Dataflow", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - }, - "IL3000": { - "id": "IL3000", - "shortDescription": "Avoid using accessing Assembly file path when publishing as a single-file", - "fullDescription": "'{0}' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3000", - "properties": { - "category": "Publish", - "isEnabledByDefault": true, - "typeName": "AvoidAssemblyLocationInSingleFile", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "IL3001": { - "id": "IL3001", - "shortDescription": "Avoid using accessing Assembly file path when publishing as a single-file", - "fullDescription": "'{0}' will throw for assemblies embedded in a single-file app", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/il3001", - "properties": { - "category": "Publish", - "isEnabledByDefault": true, - "typeName": "AvoidAssemblyLocationInSingleFile", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetCore.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1309": { - "id": "CA1309", - "shortDescription": "Use ordinal string comparison", - "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "CSharpUseOrdinalStringComparisonAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1824": { - "id": "CA1824", - "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", - "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpMarkAssembliesWithNeutralResourcesLanguageAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1825": { - "id": "CA1825", - "shortDescription": "Avoid zero-length array allocations", - "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "CSharpAvoidZeroLengthArrayAllocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2016": { - "id": "CA2016", - "shortDescription": "Forward the 'CancellationToken' parameter to methods that take one", - "fullDescription": "Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "CSharpForwardCancellationTokenToInvocationsAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetCore.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1309": { - "id": "CA1309", - "shortDescription": "Use ordinal string comparison", - "fullDescription": "A string comparison operation that is nonlinguistic does not set the StringComparison parameter to either Ordinal or OrdinalIgnoreCase. By explicitly setting the parameter to either StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase, your code often gains speed, becomes more correct, and becomes more reliable.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309", - "properties": { - "category": "Globalization", - "isEnabledByDefault": false, - "typeName": "BasicUseOrdinalStringComparisonAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA1824": { - "id": "CA1824", - "shortDescription": "Mark assemblies with NeutralResourcesLanguageAttribute", - "fullDescription": "The NeutralResourcesLanguage attribute informs the ResourceManager of the language that was used to display the resources of a neutral culture for an assembly. This improves lookup performance for the first resource that you load and can reduce your working set.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1824", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicMarkAssembliesWithNeutralResourcesLanguageAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode", - "CompilationEnd" - ] - } - }, - "CA1825": { - "id": "CA1825", - "shortDescription": "Avoid zero-length array allocations", - "fullDescription": "Avoid unnecessary zero-length array allocations. Use {0} instead.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1825", - "properties": { - "category": "Performance", - "isEnabledByDefault": true, - "typeName": "BasicAvoidZeroLengthArrayAllocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2016": { - "id": "CA2016", - "shortDescription": "Forward the 'CancellationToken' parameter to methods that take one", - "fullDescription": "Forward the 'CancellationToken' parameter to methods that take one to ensure the operation cancellation notifications gets properly propagated, or pass in 'CancellationToken.None' explicitly to indicate intentionally not propagating the token.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2016", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "BasicForwardCancellationTokenToInvocationsAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/src/Microsoft.NetCore.Analyzers/RulesMissingDocumentation.md b/src/Microsoft.NetCore.Analyzers/RulesMissingDocumentation.md deleted file mode 100644 index 75e0f77588..0000000000 --- a/src/Microsoft.NetCore.Analyzers/RulesMissingDocumentation.md +++ /dev/null @@ -1,4 +0,0 @@ -# Rules without documentation - -Rule ID | Missing Help Link | Title | ---------|-------------------|-------| diff --git a/src/Microsoft.NetCore.Analyzers/Setup/Microsoft.NetCore.Analyzers.Setup.csproj b/src/Microsoft.NetCore.Analyzers/Setup/Microsoft.NetCore.Analyzers.Setup.csproj deleted file mode 100644 index 10d97189a3..0000000000 --- a/src/Microsoft.NetCore.Analyzers/Setup/Microsoft.NetCore.Analyzers.Setup.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - net472 - false - false - false - false - true - false - true - - - - - Microsoft.NetCore.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.NetCore.CSharp.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.NetCore.VisualBasic.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - diff --git a/src/Microsoft.NetCore.Analyzers/Setup/Properties/launchSettings.json b/src/Microsoft.NetCore.Analyzers/Setup/Properties/launchSettings.json deleted file mode 100644 index 1830408569..0000000000 --- a/src/Microsoft.NetCore.Analyzers/Setup/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Visual Studio Extension": { - "executablePath": "$(DevEnvDir)devenv.exe", - "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" - } - } -} diff --git a/src/Microsoft.NetCore.Analyzers/Setup/source.extension.vsixmanifest b/src/Microsoft.NetCore.Analyzers/Setup/source.extension.vsixmanifest deleted file mode 100644 index 1aeffc679c..0000000000 --- a/src/Microsoft.NetCore.Analyzers/Setup/source.extension.vsixmanifest +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Microsoft.NetCore Analyzers - Analyzers for .NetCore APIs. - EULA.rtf - - - - - - - - - - - - - - - - - - - diff --git a/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.md b/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.md deleted file mode 100644 index bbf73cf670..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.md +++ /dev/null @@ -1,85 +0,0 @@ -# Microsoft.NetFramework.Analyzers - -## [CA1058](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1058): Types should not extend certain base types - -An externally visible type extends certain base types. Use one of the alternatives. - -|Item|Value| -|-|-| -|Category|Design| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA2153](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2153): Do Not Catch Corrupted State Exceptions - -Catching corrupted state exceptions could mask errors (such as access violations), resulting in inconsistent state of execution or making it easier for attackers to compromise system. Instead, catch and handle a more specific set of exception type(s) or re-throw the exception. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3075](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3075): Insecure DTD processing in XML - -Using XmlTextReader.Load(), creating an insecure XmlReaderSettings instance when invoking XmlReader.Create(), setting the InnerXml property of the XmlDocument and enabling DTD processing using XmlUrlResolver insecurely can lead to information disclosure. Replace it with a call to the Load() method overload that takes an XmlReader instance, use XmlReader.Create() to accept XmlReaderSettings arguments or consider explicitly setting secure values. The DataViewSettingCollectionString property of DataViewManager should always be assigned from a trusted source, the DtdProcessing property should be set to false, and the XmlResolver property should be changed to XmlSecureResolver or null. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3076](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076): Insecure XSLT script processing. - -Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3077](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077): Insecure Processing in API Design, XmlDocument and XmlTextReader - -Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA3147](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3147): Mark Verb Handlers With Validate Antiforgery Token - -Missing ValidateAntiForgeryTokenAttribute on controller action {0} - -|Item|Value| -|-|-| -|Category|Security| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- - -## [CA9998](https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers): Analyzer package has been deprecated - -FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - -|Item|Value| -|-|-| -|Category|Reliability| -|Enabled|True| -|Severity|Warning| -|CodeFix|False| ---- diff --git a/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.sarif b/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.sarif deleted file mode 100644 index 07241a0d01..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.sarif +++ /dev/null @@ -1,206 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/sarif-1.0.0", - "version": "1.0.0", - "runs": [ - { - "tool": { - "name": "Microsoft.NetFramework.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA1058": { - "id": "CA1058", - "shortDescription": "Types should not extend certain base types", - "fullDescription": "An externally visible type extends certain base types. Use one of the alternatives.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1058", - "properties": { - "category": "Design", - "isEnabledByDefault": true, - "typeName": "TypesShouldNotExtendCertainBaseTypesAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "PortedFromFxCop", - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA2153": { - "id": "CA2153", - "shortDescription": "Do Not Catch Corrupted State Exceptions", - "fullDescription": "Catching corrupted state exceptions could mask errors (such as access violations), resulting in inconsistent state of execution or making it easier for attackers to compromise system. Instead, catch and handle a more specific set of exception type(s) or re-throw the exception.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2153", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotCatchCorruptedStateExceptionsAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3075": { - "id": "CA3075", - "shortDescription": "Insecure DTD processing in XML", - "fullDescription": "Using XmlTextReader.Load(), creating an insecure XmlReaderSettings instance when invoking XmlReader.Create(), setting the InnerXml property of the XmlDocument and enabling DTD processing using XmlUrlResolver insecurely can lead to information disclosure. Replace it with a call to the Load() method overload that takes an XmlReader instance, use XmlReader.Create() to accept XmlReaderSettings arguments or consider explicitly setting secure values. The DataViewSettingCollectionString property of DataViewManager should always be assigned from a trusted source, the DtdProcessing property should be set to false, and the XmlResolver property should be changed to XmlSecureResolver or null. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3075", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "DoNotUseInsecureDtdProcessingAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3147": { - "id": "CA3147", - "shortDescription": "Mark Verb Handlers With Validate Antiforgery Token", - "fullDescription": "Missing ValidateAntiForgeryTokenAttribute on controller action {0}", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3147", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "MarkVerbHandlersWithValidateAntiforgeryTokenAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA9998": { - "id": "CA9998", - "shortDescription": "Analyzer package has been deprecated", - "fullDescription": "FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers", - "properties": { - "category": "Reliability", - "isEnabledByDefault": true, - "typeName": "DeprecationAnalyzer", - "languages": [ - "C#", - "Visual Basic" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetFramework.CSharp.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA3076": { - "id": "CA3076", - "shortDescription": "Insecure XSLT script processing.", - "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotUseInsecureXSLTScriptExecutionAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3077": { - "id": "CA3077", - "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", - "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "CSharpDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", - "languages": [ - "C#" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - }, - { - "tool": { - "name": "Microsoft.NetFramework.VisualBasic.Analyzers", - "version": "3.3.3", - "language": "en-US" - }, - "rules": { - "CA3076": { - "id": "CA3076", - "shortDescription": "Insecure XSLT script processing.", - "fullDescription": "Providing an insecure XsltSettings instance and an insecure XmlResolver instance to XslCompiledTransform.Load method is potentially unsafe as it allows processing script within XSL, which on an untrusted XSL input may lead to malicious code execution. Either replace the insecure XsltSettings argument with XsltSettings.Default or an instance that has disabled document function and script execution, or replace the XmlResolver argument with null or an XmlSecureResolver instance. This message may be suppressed if the input is known to be from a trusted source and external resource resolution from locations that are not known in advance must be supported.", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3076", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "BasicDoNotUseInsecureXSLTScriptExecutionAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - }, - "CA3077": { - "id": "CA3077", - "shortDescription": "Insecure Processing in API Design, XmlDocument and XmlTextReader", - "fullDescription": "Enabling DTD processing on all instances derived from XmlTextReader or  XmlDocument and using XmlUrlResolver for resolving external XML entities may lead to information disclosure. Ensure to set the XmlResolver property to null, create an instance of XmlSecureResolver when processing untrusted input, or use XmlReader.Create method with a secure XmlReaderSettings argument. Unless you need to enable it, ensure the DtdProcessing property is set to false. ", - "defaultLevel": "warning", - "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca3077", - "properties": { - "category": "Security", - "isEnabledByDefault": true, - "typeName": "BasicDoNotUseInsecureDtdProcessingInApiDesignAnalyzer", - "languages": [ - "Visual Basic" - ], - "tags": [ - "Telemetry", - "EnabledRuleInAggressiveMode" - ] - } - } - } - } - ] -} \ No newline at end of file diff --git a/src/Microsoft.NetFramework.Analyzers/RulesMissingDocumentation.md b/src/Microsoft.NetFramework.Analyzers/RulesMissingDocumentation.md deleted file mode 100644 index 75e0f77588..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/RulesMissingDocumentation.md +++ /dev/null @@ -1,4 +0,0 @@ -# Rules without documentation - -Rule ID | Missing Help Link | Title | ---------|-------------------|-------| diff --git a/src/Microsoft.NetFramework.Analyzers/Setup/Microsoft.NetFramework.Analyzers.Setup.csproj b/src/Microsoft.NetFramework.Analyzers/Setup/Microsoft.NetFramework.Analyzers.Setup.csproj deleted file mode 100644 index c47356ce65..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/Setup/Microsoft.NetFramework.Analyzers.Setup.csproj +++ /dev/null @@ -1,34 +0,0 @@ - - - - net472 - false - false - false - false - true - false - true - - - - - Microsoft.NetFramework.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.NetFramework.CSharp.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - Microsoft.NetFramework.VisualBasic.Analyzers - BuiltProjectOutputGroup - DebugSymbolsProjectOutputGroup - true - - - diff --git a/src/Microsoft.NetFramework.Analyzers/Setup/Properties/launchSettings.json b/src/Microsoft.NetFramework.Analyzers/Setup/Properties/launchSettings.json deleted file mode 100644 index 1830408569..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/Setup/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Visual Studio Extension": { - "executablePath": "$(DevEnvDir)devenv.exe", - "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" - } - } -} diff --git a/src/Microsoft.NetFramework.Analyzers/Setup/source.extension.vsixmanifest b/src/Microsoft.NetFramework.Analyzers/Setup/source.extension.vsixmanifest deleted file mode 100644 index e28a935ff2..0000000000 --- a/src/Microsoft.NetFramework.Analyzers/Setup/source.extension.vsixmanifest +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Microsoft.NetFramework Analyzers - Analyzers for APIs specific to the full .NetFramework which are not present in .NetCore - EULA.rtf - - - - - - - - - - - - - - - - - - - diff --git a/src/NetAnalyzers/CSharp/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.CSharp.Analyzers.csproj b/src/NetAnalyzers/CSharp/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.CSharp.Analyzers.csproj deleted file mode 100644 index cbedb73a3d..0000000000 --- a/src/NetAnalyzers/CSharp/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.CSharp.Analyzers.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - - - - - - - - \ No newline at end of file diff --git a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Microsoft.NetCore.CSharp.Analyzers.csproj b/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Microsoft.NetCore.CSharp.Analyzers.csproj deleted file mode 100644 index 73acdf5430..0000000000 --- a/src/NetAnalyzers/CSharp/Microsoft.NetCore.Analyzers/Microsoft.NetCore.CSharp.Analyzers.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netstandard2.0 - - - - - - - - - - - \ No newline at end of file diff --git a/src/NetAnalyzers/CSharp/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.CSharp.Analyzers.csproj b/src/NetAnalyzers/CSharp/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.CSharp.Analyzers.csproj deleted file mode 100644 index b44af07dd8..0000000000 --- a/src/NetAnalyzers/CSharp/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.CSharp.Analyzers.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - netstandard2.0 - - - - - \ No newline at end of file diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AbstractTypesShouldNotHaveConstructors.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AbstractTypesShouldNotHaveConstructors.cs index 514f79dcde..8caa89c658 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AbstractTypesShouldNotHaveConstructors.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AbstractTypesShouldNotHaveConstructors.cs @@ -27,8 +27,7 @@ public sealed class AbstractTypesShouldNotHaveConstructorsAnalyzer : DiagnosticA RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidExcessiveParametersOnGenericTypes.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidExcessiveParametersOnGenericTypes.cs index 4cf0dd5b0d..01035eb601 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidExcessiveParametersOnGenericTypes.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidExcessiveParametersOnGenericTypes.cs @@ -27,7 +27,6 @@ public sealed class AvoidExcessiveParametersOnGenericTypes : DiagnosticAnalyzer s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidOutParameters.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidOutParameters.cs index e1648ce14a..5992abc5a5 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidOutParameters.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/AvoidOutParameters.cs @@ -28,7 +28,6 @@ public sealed class AvoidOutParameters : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLast.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLast.cs index 3c69749d78..2903b88f0a 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLast.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLast.cs @@ -69,6 +69,12 @@ public override void Initialize(AnalysisContext context) return; } + if (symbolContext.Options.IsConfiguredToSkipAnalysis(Rule, methodSymbol, + symbolContext.Compilation, symbolContext.CancellationToken)) + { + return; + } + int last = methodSymbol.Parameters.Length - 1; if (last >= 0 && methodSymbol.Parameters[last].IsParams) { diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DeclareTypesInNamespaces.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DeclareTypesInNamespaces.cs index 64e19fdd35..8f6fac451a 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DeclareTypesInNamespaces.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DeclareTypesInNamespaces.cs @@ -28,8 +28,7 @@ public sealed class DeclareTypesInNamespacesAnalyzer : DiagnosticAnalyzer RuleLevel.IdeSuggestion, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DefineAccessorsForAttributeArguments.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DefineAccessorsForAttributeArguments.cs index 720a82c92b..71d919c054 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DefineAccessorsForAttributeArguments.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DefineAccessorsForAttributeArguments.cs @@ -37,8 +37,7 @@ public abstract class DefineAccessorsForAttributeArgumentsAnalyzer : DiagnosticA RuleLevel.Disabled, description: null, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor IncreaseVisibilityRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, @@ -47,8 +46,7 @@ public abstract class DefineAccessorsForAttributeArgumentsAnalyzer : DiagnosticA RuleLevel.Disabled, description: null, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor RemoveSetterRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, @@ -57,8 +55,7 @@ public abstract class DefineAccessorsForAttributeArgumentsAnalyzer : DiagnosticA RuleLevel.Disabled, description: null, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(DefaultRule, IncreaseVisibilityRule, RemoveSetterRule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotExposeGenericLists.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotExposeGenericLists.cs index 73e8259ae3..bd96a4d3d2 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotExposeGenericLists.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotExposeGenericLists.cs @@ -25,8 +25,7 @@ public sealed class DoNotExposeGenericLists : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotNameEnumValuesReserved.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotNameEnumValuesReserved.cs index dd841355f2..6bf3946b46 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotNameEnumValuesReserved.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotNameEnumValuesReserved.cs @@ -27,8 +27,7 @@ public sealed class DoNotNameEnumValuesReserved : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotOverloadOperatorEqualsOnReferenceTypes.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotOverloadOperatorEqualsOnReferenceTypes.cs index 24427ea9d5..44cd3cf9ad 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotOverloadOperatorEqualsOnReferenceTypes.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotOverloadOperatorEqualsOnReferenceTypes.cs @@ -25,8 +25,7 @@ public sealed class DoNotOverloadOperatorEqualsOnReferenceTypes : DiagnosticAnal RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotPassTypesByReference.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotPassTypesByReference.cs index 26b376382a..291a61d7db 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotPassTypesByReference.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/DoNotPassTypesByReference.cs @@ -26,7 +26,6 @@ public sealed class DoNotPassTypesByReference : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumWithFlagsAttribute.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumWithFlagsAttribute.cs index 5c500258d1..41c6480023 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumWithFlagsAttribute.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumWithFlagsAttribute.cs @@ -46,8 +46,7 @@ public sealed class EnumWithFlagsAttributeAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescriptionCA1027, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); private static readonly LocalizableString s_localizableTitleCA2217 = new LocalizableResourceString(nameof(MicrosoftCodeQualityAnalyzersResources.DoNotMarkEnumsWithFlagsTitle), MicrosoftCodeQualityAnalyzersResources.ResourceManager, typeof(MicrosoftCodeQualityAnalyzersResources)); private static readonly LocalizableString s_localizableMessageCA2217 = new LocalizableResourceString(nameof(MicrosoftCodeQualityAnalyzersResources.DoNotMarkEnumsWithFlagsMessage), MicrosoftCodeQualityAnalyzersResources.ResourceManager, typeof(MicrosoftCodeQualityAnalyzersResources)); @@ -59,8 +58,7 @@ public sealed class EnumWithFlagsAttributeAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescriptionCA2217, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule1027, Rule2217); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHaveZeroValue.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHaveZeroValue.cs index dbb6518861..4adfce1ef1 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHaveZeroValue.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHaveZeroValue.cs @@ -53,7 +53,6 @@ public sealed class EnumsShouldHaveZeroValueAnalyzer : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, additionalCustomTags: RuleRenameCustomTag); private static readonly LocalizableString s_localizableMessageRuleMultipleZero = new LocalizableResourceString(nameof(MicrosoftCodeQualityAnalyzersResources.EnumsShouldHaveZeroValueMessageFlagsMultipleZeros), MicrosoftCodeQualityAnalyzersResources.ResourceManager, typeof(MicrosoftCodeQualityAnalyzersResources)); @@ -65,7 +64,6 @@ public sealed class EnumsShouldHaveZeroValueAnalyzer : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, additionalCustomTags: RuleMultipleZeroCustomTag); private static readonly LocalizableString s_localizableMessageRuleNoZero = new LocalizableResourceString(nameof(MicrosoftCodeQualityAnalyzersResources.EnumsShouldHaveZeroValueMessageNotFlagsNoZeroValue), MicrosoftCodeQualityAnalyzersResources.ResourceManager, typeof(MicrosoftCodeQualityAnalyzersResources)); @@ -77,7 +75,6 @@ public sealed class EnumsShouldHaveZeroValueAnalyzer : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, additionalCustomTags: RuleNoZeroCustomTag); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(RuleRename, RuleMultipleZero, RuleNoZero); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldDifferByMoreThanCase.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldDifferByMoreThanCase.cs index 0f208233b7..549d0e0939 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldDifferByMoreThanCase.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldDifferByMoreThanCase.cs @@ -33,8 +33,7 @@ public sealed class IdentifiersShouldDifferByMoreThanCaseAnalyzer : DiagnosticAn RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldHaveCorrectSuffix.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldHaveCorrectSuffix.cs index f312b681d7..485fa8878d 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldHaveCorrectSuffix.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldHaveCorrectSuffix.cs @@ -171,13 +171,13 @@ private static void AnalyzeCompilationStart(CompilationStartAnalysisContext cont } private static bool TryGetTypeSuffix(IEnumerable typeSymbols, ImmutableDictionary hardcodedMap, - SymbolNamesWithValueOption userMap, [NotNullWhen(true)] out SuffixInfo? suffixInfo) + SymbolNamesWithValueOption userMap, [NotNullWhen(true)] out SuffixInfo? suffixInfo) { foreach (var type in typeSymbols) { // User specific mapping has higher priority than hardcoded one if (userMap.TryGetValue(type.OriginalDefinition, out var suffix) && - !string.IsNullOrWhiteSpace(suffix)) + !RoslynString.IsNullOrWhiteSpace(suffix)) { suffixInfo = SuffixInfo.Create(suffix, canSuffixBeCollection: false); return true; diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldNotHaveIncorrectSuffix.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldNotHaveIncorrectSuffix.cs index b8c84ceaea..015e33a5bf 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldNotHaveIncorrectSuffix.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/IdentifiersShouldNotHaveIncorrectSuffix.cs @@ -33,8 +33,7 @@ public sealed class IdentifiersShouldNotHaveIncorrectSuffixAnalyzer : Diagnostic RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor MemberNewerVersionRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, s_localizableMessageMemberNewerVersion, @@ -42,8 +41,7 @@ public sealed class IdentifiersShouldNotHaveIncorrectSuffixAnalyzer : Diagnostic RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor TypeNewerVersionRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, s_localizableMessageTypeNewerVersion, @@ -51,8 +49,7 @@ public sealed class IdentifiersShouldNotHaveIncorrectSuffixAnalyzer : Diagnostic RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor MemberWithAlternateRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, s_localizableMessageMemberWithAlternate, @@ -60,8 +57,7 @@ public sealed class IdentifiersShouldNotHaveIncorrectSuffixAnalyzer : Diagnostic RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create( TypeNoAlternateRule, diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypes.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypes.cs index a8da7d4062..85a521a3f4 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypes.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypes.cs @@ -38,8 +38,7 @@ public sealed class InterfaceMethodsShouldBeCallableByChildTypesAnalyzer : Diagn RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public sealed override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithAttributesDiagnosticAnalyzer.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithAttributesDiagnosticAnalyzer.cs index 43021b3dc4..8288582c20 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithAttributesDiagnosticAnalyzer.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithAttributesDiagnosticAnalyzer.cs @@ -39,7 +39,6 @@ public sealed class MarkAssembliesWithAttributesDiagnosticAnalyzer : DiagnosticA description: s_localizableDescriptionCA1014, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isReportedAtCompilationEnd: true); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(CA1016Rule, CA1014Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithComVisible.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithComVisible.cs index dfe519eb19..333caf1388 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithComVisible.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MarkAssembliesWithComVisible.cs @@ -27,7 +27,6 @@ public sealed class MarkAssembliesWithComVisibleAnalyzer : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); @@ -39,7 +38,6 @@ public sealed class MarkAssembliesWithComVisibleAnalyzer : DiagnosticAnalyzer description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MovePInvokesToNativeMethodsClass.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MovePInvokesToNativeMethodsClass.cs index ed35cc8d0e..54f14a1183 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MovePInvokesToNativeMethodsClass.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/MovePInvokesToNativeMethodsClass.cs @@ -29,7 +29,6 @@ public sealed class MovePInvokesToNativeMethodsClassAnalyzer : DiagnosticAnalyze description: s_localizableDescription, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false); private const string NativeMethodsText = "NativeMethods"; diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/ParameterNamesShouldMatchBaseDeclaration.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/ParameterNamesShouldMatchBaseDeclaration.cs index 93520289de..23355d599b 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/ParameterNamesShouldMatchBaseDeclaration.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/ParameterNamesShouldMatchBaseDeclaration.cs @@ -30,8 +30,7 @@ public sealed class ParameterNamesShouldMatchBaseDeclarationAnalyzer : Diagnosti RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); /// public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UseGenericEventHandlerInstances.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UseGenericEventHandlerInstances.cs index 8d2bc23109..66718bee21 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UseGenericEventHandlerInstances.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UseGenericEventHandlerInstances.cs @@ -40,8 +40,7 @@ public sealed class UseGenericEventHandlerInstancesAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescriptionForDelegate, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor RuleForEvents = DiagnosticDescriptorHelper.Create( RuleId, @@ -51,8 +50,7 @@ public sealed class UseGenericEventHandlerInstancesAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescriptionForEvent, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor RuleForEvents2 = DiagnosticDescriptorHelper.Create( RuleId, @@ -62,8 +60,7 @@ public sealed class UseGenericEventHandlerInstancesAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescriptionForEvent2, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(RuleForDelegates, RuleForEvents, RuleForEvents2); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UsePropertiesWhereAppropriate.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UsePropertiesWhereAppropriate.cs index db002a1fdd..6670161544 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UsePropertiesWhereAppropriate.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/UsePropertiesWhereAppropriate.cs @@ -30,8 +30,7 @@ public sealed class UsePropertiesWhereAppropriateAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, // Heuristic based rule. description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); private const string GetHashCodeName = "GetHashCode"; private const string GetEnumeratorName = "GetEnumerator"; diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode.cs index b7d26f5afa..07c4e839d0 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode.cs @@ -36,8 +36,7 @@ public sealed class AvoidDeadConditionalCode : DiagnosticAnalyzer RuleLevel.Disabled, description: null, isPortedFxCopRule: false, - isDataflowRule: true, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: true); internal static DiagnosticDescriptor NeverNullRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, @@ -46,8 +45,7 @@ public sealed class AvoidDeadConditionalCode : DiagnosticAnalyzer RuleLevel.Disabled, description: null, isPortedFxCopRule: false, - isDataflowRule: true, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: true); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(AlwaysTrueFalseOrNullRule, NeverNullRule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/CodeMetricsAnalyzer.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/CodeMetricsAnalyzer.cs index 5735b11891..6bae1da363 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/CodeMetricsAnalyzer.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Maintainability/CodeMetricsAnalyzer.cs @@ -74,7 +74,6 @@ public sealed class CodeMetricsAnalyzer : DiagnosticAnalyzer description: s_localizableDescriptionCA1501, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); @@ -86,7 +85,6 @@ public sealed class CodeMetricsAnalyzer : DiagnosticAnalyzer description: s_localizableDescriptionCA1502, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); @@ -98,7 +96,6 @@ public sealed class CodeMetricsAnalyzer : DiagnosticAnalyzer description: s_localizableDescriptionCA1505, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); @@ -110,7 +107,6 @@ public sealed class CodeMetricsAnalyzer : DiagnosticAnalyzer description: s_localizableDescriptionCA1506, isPortedFxCopRule: true, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); @@ -122,7 +118,6 @@ public sealed class CodeMetricsAnalyzer : DiagnosticAnalyzer description: s_localizableDescriptionCA1509, isPortedFxCopRule: false, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isEnabledByDefaultInAggressiveMode: false, isReportedAtCompilationEnd: true); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.csproj b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.csproj deleted file mode 100644 index ec0a9a8972..0000000000 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.Analyzers.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - netstandard2.0 - $(DefineConstants),CODE_QUALITY_ANALYZERS - - *$(MSBuildProjectFile)* - - - - - - - - - - - - - - diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx index ae77e36978..730afdbfb1 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/MicrosoftCodeQualityAnalyzersResources.resx @@ -748,15 +748,6 @@ Either replace the suffix '{0}' in member name '{1}' with the suggested alternate '{2}' or remove the suffix completely - - Flags enums should have plural names - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - - - Flags enums should have plural names - Identifiers should not match keywords @@ -775,15 +766,6 @@ Rename namespace {0} so that it no longer conflicts with the reserved language keyword '{1}'. Using a reserved keyword as the name of a namespace makes it harder for consumers in other languages to use the namespace. - - Only FlagsAttribute enums should have plural names - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - - - Only FlagsAttribute enums should have plural names - Property names should not match get methods @@ -1454,10 +1436,4 @@ Apply 'AttributeUsageAttribute' - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - Analyzer package has been deprecated - diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/ReviewVisibleEventHandlers.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/ReviewVisibleEventHandlers.cs index 49ab3c4e73..5475706747 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/ReviewVisibleEventHandlers.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/ReviewVisibleEventHandlers.cs @@ -28,8 +28,7 @@ public sealed class ReviewVisibleEventHandlersAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfaces.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfaces.cs index ca4a3529eb..3bdd57de33 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfaces.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfaces.cs @@ -46,37 +46,44 @@ private static void CheckTypes(SymbolAnalysisContext context) var type = (INamedTypeSymbol)context.Symbol; // Only classes can have overridable members, and furthermore, only consider classes that can be subclassed outside this assembly. Note: Internal types can still be subclassed in this assembly, and also in other assemblies that have access to internal types in this assembly via [InternalsVisibleTo] (recall that this permission must be whitelisted in this assembly). In both of these cases, there should be no security vulnerabilities introduced by overriding methods, hence these types can be ignored. - if (type.TypeKind == TypeKind.Class && - !type.IsSealed && - type.GetResultantVisibility().IsAtLeastAsVisibleAs(SymbolVisibility.Public) && - (!type.Constructors.Any() || type.Constructors.Any(c => c.GetResultantVisibility().IsAtLeastAsVisibleAs(SymbolVisibility.Public)))) + if (type.TypeKind != TypeKind.Class || + type.IsSealed || + !type.GetResultantVisibility().IsAtLeastAsVisibleAs(SymbolVisibility.Public) || + type.Constructors.Any() && !type.Constructors.Any(c => c.GetResultantVisibility().IsAtLeastAsVisibleAs(SymbolVisibility.Public))) { - // look for implementations of interfaces members declared on this type - foreach (var iface in type.AllInterfaces) + return; + } + + // look for implementations of interfaces members declared on this type + var directInterfacesAndTheirInterfaces = type.Interfaces.SelectMany(i => Enumerable.Repeat(i, 1).Concat(i.AllInterfaces)) + .Distinct(SymbolEqualityComparer.Default); + foreach (INamedTypeSymbol iface in directInterfacesAndTheirInterfaces) + { + // only matters if the interface is defined to be internal + if (iface.DeclaredAccessibility != Accessibility.Internal) + { + continue; + } + + // look for implementation of interface members + foreach (var imember in iface.GetMembers()) { - // only matters if the interface is defined to be internal - if (iface.DeclaredAccessibility == Accessibility.Internal) + var member = type.FindImplementationForInterfaceMember(imember); + // only matters if member can be overridden + if (member == null || !CanBeOverridden(member)) { - // look for implementation of interface members - foreach (var imember in iface.GetMembers()) - { - var member = type.FindImplementationForInterfaceMember(imember); + continue; + } - // only matters if member can be overridden - if (member != null && CanBeOverridden(member)) - { - if (member.ContainingType != null && member.ContainingType.Equals(type)) - { - context.ReportDiagnostic(member.CreateDiagnostic(Rule)); - } - else - { - // we have a member and its not declared on this type? - // must be implicit implementation of base member - context.ReportDiagnostic(type.CreateDiagnostic(Rule)); - } - } - } + if (member.ContainingType != null && member.ContainingType.Equals(type)) + { + context.ReportDiagnostic(member.CreateDiagnostic(Rule)); + } + else + { + // we have a member and its not declared on this type? + // must be implicit implementation of base member + context.ReportDiagnostic(type.CreateDiagnostic(Rule)); } } } diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriate.cs b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriate.cs index 4a75cd3216..8cf841a53b 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriate.cs +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriate.cs @@ -43,47 +43,57 @@ public sealed class UseLiteralsWhereAppropriateAnalyzer : DiagnosticAnalyzer public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(DefaultRule, EmptyStringRule); - public override void Initialize(AnalysisContext analysisContext) + public override void Initialize(AnalysisContext context) { - analysisContext.EnableConcurrentExecution(); - analysisContext.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); - analysisContext.RegisterOperationAction(saContext => + context.RegisterCompilationStartAction(context => { - var fieldInitializer = saContext.Operation as IFieldInitializerOperation; + var builder = ImmutableHashSet.CreateBuilder(); + builder.Add(context.Compilation.GetSpecialType(SpecialType.System_IntPtr)); + builder.Add(context.Compilation.GetSpecialType(SpecialType.System_UIntPtr)); - // Diagnostics are reported on the last initialized field to retain the previous FxCop behavior - // Note all the descriptors/rules for this analyzer have the same ID and category and hence - // will always have identical configured visibility. - var lastField = fieldInitializer?.InitializedFields.LastOrDefault(); - var fieldInitializerValue = fieldInitializer?.Value; - if (fieldInitializerValue == null || - lastField == null || - lastField.IsConst || - !lastField.IsReadOnly || - !fieldInitializerValue.ConstantValue.HasValue || - !saContext.Options.MatchesConfiguredVisibility(DefaultRule, lastField, saContext.Compilation, saContext.CancellationToken, defaultRequiredVisibility: SymbolVisibilityGroup.Internal | SymbolVisibilityGroup.Private) || - !saContext.Options.MatchesConfiguredModifiers(DefaultRule, lastField, saContext.Compilation, saContext.CancellationToken, defaultRequiredModifiers: SymbolModifiers.Static)) - { - return; - } - - var initializerValue = fieldInitializerValue.ConstantValue.Value; + var constantIncompatibleTypes = builder.ToImmutable(); - // Though null is const we don't fire the diagnostic to be FxCop Compact - if (initializerValue != null) + context.RegisterOperationAction(context => { - if (fieldInitializerValue.Type?.SpecialType == SpecialType.System_String && - ((string)initializerValue).Length == 0) + var fieldInitializer = context.Operation as IFieldInitializerOperation; + + // Diagnostics are reported on the last initialized field to retain the previous FxCop behavior + // Note all the descriptors/rules for this analyzer have the same ID and category and hence + // will always have identical configured visibility. + var lastField = fieldInitializer?.InitializedFields.LastOrDefault(); + var fieldInitializerValue = fieldInitializer?.Value; + if (fieldInitializerValue == null || + lastField == null || + lastField.IsConst || + !lastField.IsReadOnly || + !fieldInitializerValue.ConstantValue.HasValue || + !context.Options.MatchesConfiguredVisibility(DefaultRule, lastField, context.Compilation, context.CancellationToken, defaultRequiredVisibility: SymbolVisibilityGroup.Internal | SymbolVisibilityGroup.Private) || + !context.Options.MatchesConfiguredModifiers(DefaultRule, lastField, context.Compilation, context.CancellationToken, defaultRequiredModifiers: SymbolModifiers.Static)) { - saContext.ReportDiagnostic(lastField.CreateDiagnostic(EmptyStringRule, lastField.Name)); return; } - saContext.ReportDiagnostic(lastField.CreateDiagnostic(DefaultRule, lastField.Name)); - } - }, - OperationKind.FieldInitializer); + var initializerValue = fieldInitializerValue.ConstantValue.Value; + + // Though null is const we don't fire the diagnostic to be FxCop Compact + if (initializerValue != null && + !constantIncompatibleTypes.Contains(fieldInitializerValue.Type)) + { + if (fieldInitializerValue.Type?.SpecialType == SpecialType.System_String && + ((string)initializerValue).Length == 0) + { + context.ReportDiagnostic(lastField.CreateDiagnostic(EmptyStringRule, lastField.Name)); + return; + } + + context.ReportDiagnostic(lastField.CreateDiagnostic(DefaultRule, lastField.Name)); + } + }, + OperationKind.FieldInitializer); + }); } } } \ No newline at end of file diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.cs.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.cs.xlf index 84291c15a1..80a2e08bfc 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.cs.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.cs.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Připojit .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Buď nahraďte příponu {0} v názvu člena {1} navrhovanou alternativou {2}, nebo příponu úplně odeberte. - - Flags enums should have plural names - Výčty příznaků mají mít názvy v množném čísle. - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Veřejný výčet obsahuje atribut System.FlagsAttribute, ale jeho název nekončí na s. Typy, které jsou označené atributem FlagsAttribute, mají názvy v množném čísle, protože tento atribut označuje, že se dá zadat více než jedna hodnota. - - - - Flags enums should have plural names - Výčty příznaků mají mít názvy v množném čísle. - - Identifiers should not match keywords Identifikátory se nemají shodovat s klíčovými slovy. @@ -1317,21 +1292,6 @@ Přejmenujte názvový prostor {0} tak, aby už nebyl v konfliktu s rezervovaným klíčovým slovem {1} jazyka. Použití rezervovaného klíčového slova jako názvu názvového prostoru znesnadňuje konzumentům v jiných jazycích použití tohoto názvového prostoru. - - Only FlagsAttribute enums should have plural names - Názvy v množném čísle mají mít jenom výčty FlagsAttribute. - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Názvy v množném čísle podle zásad vytváření názvů označují, že lze současně zadat více než jednu hodnotu výčtu. - - - - Only FlagsAttribute enums should have plural names - Názvy v množném čísle mají mít jenom výčty FlagsAttribute. - - Property names should not match get methods Názvy vlastností se nemají shodovat s metodami Get. diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.de.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.de.xlf index ae733f47dc..68c0e0ae0c 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.de.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.de.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) "ConfigureAwait(true)" anfügen @@ -1272,21 +1262,6 @@ Ersetzen Sie das Suffix "{0}" im Membernamen "{1}" durch die vorgeschlagene Alternative "{2}", oder entfernen Sie das Suffix vollständig. - - Flags enums should have plural names - Flags-Enumerationen müssen Pluralnamen aufweisen - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Eine öffentliche Enumeration weist das System.FlagsAttribute-Attribut auf, und der Name endet nicht auf ""s"". Mit FlagsAttribute markierte Typen besitzen Namen in Pluralform, weil das Attribut darauf hinweist, dass mehrere Werte angegeben werden können. - - - - Flags enums should have plural names - Flags-Enumerationen müssen Pluralnamen aufweisen - - Identifiers should not match keywords Bezeichner dürfen nicht mit Schlüsselwörtern übereinstimmen @@ -1317,21 +1292,6 @@ Benennen Sie den Namespace "{0}" so um, dass er keinen Konflikt mit dem reservierten Sprachschlüsselwort "{1}" mehr verursacht. Durch die Verwendung eines reservierten Schlüsselworts als Name eines Namespace ist es für Endverbraucher in anderen Sprachen schwieriger, den Namespace zu verwenden. - - Only FlagsAttribute enums should have plural names - Nur FlagsAttribute-Enumerationen dürfen Pluralnamen aufweisen - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Die Namenskonventionen schreiben vor, dass ein Pluralname für eine Enumeration darauf hinweist, dass mehrere Werte der Enumeration gleichzeitig angegeben werden können. - - - - Only FlagsAttribute enums should have plural names - Nur FlagsAttribute-Enumerationen dürfen Pluralnamen aufweisen - - Property names should not match get methods Eigenschaftennamen dürfen nicht mit Get-Methoden übereinstimmen diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.es.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.es.xlf index c9b0e83fe2..37a4b74271 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.es.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.es.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Anexar .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Reemplace el sufijo "{0}" en el nombre del miembro "{1}" por la alternativa "{2}" sugerida o quite el sufijo por completo. - - Flags enums should have plural names - Las enumeraciones Flags deben tener nombres en plural - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Una enumeración pública tiene el atributo System.FlagsAttribute y su nombre no termina en "s". Los tipos marcados con FlagsAttribute tienen nombres en plural porque el atributo indica que se puede especificar más de un valor. - - - - Flags enums should have plural names - Las enumeraciones Flags deben tener nombres en plural - - Identifiers should not match keywords Los identificadores no deben coincidir con palabras clave @@ -1317,21 +1292,6 @@ Cambie el nombre del espacio de nombres {0} para que deje de estar en conflicto con la palabra clave reservada del lenguaje “{1}”. El uso de una palabra clave reservada como nombre de un espacio de nombres dificulta que los consumidores de otros lenguajes usen el espacio de nombres. - - Only FlagsAttribute enums should have plural names - Solo las enumeraciones FlagsAttribute deben tener nombres en plural - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Las convenciones de nomenclatura dictan que un nombre en plural para una enumeración indica que se pueden especificar varios valores de la enumeración simultáneamente. - - - - Only FlagsAttribute enums should have plural names - Solo las enumeraciones FlagsAttribute deben tener nombres en plural - - Property names should not match get methods Los nombres de propiedades no deben coincidir con los métodos get diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.fr.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.fr.xlf index eee33dde94..47289976cb 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.fr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.fr.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Ajouter .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Remplacez le suffixe '{0}' dans le nom de membre '{1}' par le substitut suggéré '{2}', ou supprimez complètement le suffixe - - Flags enums should have plural names - Les noms des enums Flags doivent être au pluriel - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Une énumération publique a l'attribut System.FlagsAttribute, et son nom finit par ""s"". Les types marqués à l'aide de FlagsAttribute ont des noms au pluriel, car l'attribut indique que plusieurs valeurs peuvent être spécifiées. - - - - Flags enums should have plural names - Les noms des enums Flags doivent être au pluriel - - Identifiers should not match keywords Les identificateurs ne doivent pas correspondre à des mots clés @@ -1317,21 +1292,6 @@ Renommez l'espace de noms {0} pour qu'il ne soit plus en conflit avec le mot clé de langage réservé '{1}'. L'utilisation d'un mot clé réservé comme nom d'espace de noms rend plus difficile l'utilisation de l'espace de noms par les contrôles serveur consommateurs dans d'autres langages. - - Only FlagsAttribute enums should have plural names - Seuls les noms des enums FlagsAttribute doivent être au pluriel - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Conformément aux conventions de nommage, l'utilisation d'un nom pluriel pour une énumération indique que plusieurs valeurs de l'énumération peuvent être spécifiées en même temps. - - - - Only FlagsAttribute enums should have plural names - Seuls les noms des enums FlagsAttribute doivent être au pluriel - - Property names should not match get methods Les noms de propriétés ne doivent pas correspondre à ceux des méthodes get diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.it.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.it.xlf index e1d92fa5d4..82da30751e 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.it.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.it.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Accoda .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Sostituire il suffisso '{0}' nel nome di membro '{1}' con l'alternativa suggerita '{2}' o rimuovere completamente il suffisso - - Flags enums should have plural names - Alle enumerazioni con Flags devono essere assegnati nomi plurali - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Un'enumerazione public include l'attributo System.FlagsAttribute e il relativo nome non termina con ""s"". Ai tipi contrassegnati con FlagsAttribute sono assegnati nomi plurali perché tale attributo indica che è possibile specificare più valori. - - - - Flags enums should have plural names - Alle enumerazioni con Flags devono essere assegnati nomi plurali - - Identifiers should not match keywords Gli identificatori non devono corrispondere a parole chiave @@ -1317,21 +1292,6 @@ Rinominare lo spazio dei nomi {0} in modo che non sia più in conflitto con la parola chiave del linguaggio riservata '{1}'. L'uso di una parola chiave riservata come nome di uno spazio dei nomi può causare complicazioni quando consumer in altri linguaggi usano lo spazio dei nomi. - - Only FlagsAttribute enums should have plural names - I nomi plurali devono essere assegnati solo alle enumerazioni con FlagsAttribute - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - In base alle convenzioni di denominazione, un nome plurale in un'enumerazione indica che è possibile specificare contemporaneamente più valori dell'enumerazione. - - - - Only FlagsAttribute enums should have plural names - I nomi plurali devono essere assegnati solo alle enumerazioni con FlagsAttribute - - Property names should not match get methods I nomi delle proprietà non devono corrispondere a metodi get diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ja.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ja.xlf index b00833d6d0..bf919d30c1 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ja.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ja.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) .ConfigureAwait(true) を追加します @@ -1272,21 +1262,6 @@ メンバー名 '{1}' のサフィックス '{0}' を推奨される '{2}' で置き換えるか、サフィックスをすべて削除してください - - Flags enums should have plural names - フラグ列挙型は、複数形の名前を含んでいなければなりません - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - パブリック列挙型に System.FlagsAttribute 属性があり、その名前の末尾に ""s"" がありません。FlagsAttribute を使用してマークされた型には複数形の名前が付きます。これは、この属性に複数の値を指定できることを示すためです。 - - - - Flags enums should have plural names - フラグ列挙型は、複数形の名前を含んでいなければなりません - - Identifiers should not match keywords 識別子はキーワードと同一にすることはできません @@ -1317,21 +1292,6 @@ 名前空間 {0} の名前を変更して、予約されている言語キーワード '{1}' と競合しないようにしてください。名前空間の名前として、予約されているキーワードを使用すると、他の言語を使用するユーザーがその名前空間を使用することが困難になります。 - - Only FlagsAttribute enums should have plural names - FlagsAttribute 列挙型のみが複数形の名前を含んでいなければなりません - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - 名前付け規則では、列挙型の複数形の名前は同時に複数の列挙型を指定できることを意味します。 - - - - Only FlagsAttribute enums should have plural names - FlagsAttribute 列挙型のみが複数形の名前を含んでいなければなりません - - Property names should not match get methods プロパティ名は get メソッドと同一にすることはできません diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ko.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ko.xlf index f86baadfcd..2e40ec2153 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ko.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ko.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) .ConfigureAwait(true) 추가 @@ -1272,21 +1262,6 @@ 멤버 이름 '{1}'의 '{0}' 접미사를 제안된 대체 접미사 '{2}'(으)로 바꾸거나 접미사를 완전히 제거하세요. - - Flags enums should have plural names - 플래그 열거형에는 복수형 이름을 사용해야 합니다. - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Public 열거형에는 System.FlagsAttribute 특성이 있으며 이 특성의 이름이 ""s""로 끝나지 않습니다. FlagsAttribute를 사용하여 표시되는 형식의 경우 이 특성이 하나 이상의 값이 지정될 수 있을 나타내므로 복수형의 이름을 사용합니다. - - - - Flags enums should have plural names - 플래그 열거형에는 복수형 이름을 사용해야 합니다. - - Identifiers should not match keywords 식별자는 키워드와 달라야 합니다. @@ -1317,21 +1292,6 @@ 예약된 언어 키워드 '{1}'과(와) 더 이상 충돌하지 않으려면 네임스페이스 {0}의 이름을 바꾸세요. 예약된 키워드를 네임스페이스의 이름으로 사용하면 다른 언어 소비자가 네임스페이스를 사용하기 어렵습니다. - - Only FlagsAttribute enums should have plural names - FlagsAttribute 열거형만 복수형 이름을 사용할 수 있습니다. - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - 명명 규칙은 열거형의 복수형 이름이 하나 이상의 열거형 값이 동시에 지정될 수 있다는 것을 표시함을 나타냅니다. - - - - Only FlagsAttribute enums should have plural names - FlagsAttribute 열거형만 복수형 이름을 사용할 수 있습니다. - - Property names should not match get methods 속성 이름은 get 메서드와 달라야 합니다. diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pl.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pl.xlf index b9ea61383a..73e2f6a740 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pl.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pl.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Dołącz element .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Zamień sufiks „{0}” w nazwie składowej „{1}” na zalecany alternatywny sufiks „{2}” lub całkowicie usuń sufiks - - Flags enums should have plural names - Wyliczenia z flagami powinny mieć nazwy w liczbie mnogiej - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Wyliczenie publiczne ma atrybut System.FlagsAttribute, lecz jego nazwa nie kończy się literą „s”. Nazwy typów oznaczonych atrybutem FlagsAttribute mają nazwy w liczbie mnogiej, ponieważ ten atrybut wskazuje, że można określić więcej niż jedną wartość. - - - - Flags enums should have plural names - Wyliczenia z flagami powinny mieć nazwy w liczbie mnogiej - - Identifiers should not match keywords Identyfikatory nie powinny być takie same jak słowa kluczowe @@ -1317,21 +1292,6 @@ Zmień nazwę przestrzeni nazw {0} tak, aby nie powodowała konfliktu z zastrzeżonym słowem kluczowym języka „{1}”. Użycie zastrzeżonego słowa kluczowego jako nazwy przestrzeni nazw utrudnia klientom użycie tej przestrzeni nazw w innych językach. - - Only FlagsAttribute enums should have plural names - Tylko wyliczenia z atrybutem FlagsAttribute powinny mieć nazwy w liczbie mnogiej - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Konwencje nazewnictwa określają, że nazwa wyliczenia w liczbie mnogiej wskazuje, iż jednocześnie można określić wiele wartości wyliczenia. - - - - Only FlagsAttribute enums should have plural names - Tylko wyliczenia z atrybutem FlagsAttribute powinny mieć nazwy w liczbie mnogiej - - Property names should not match get methods Nazwy właściwości nie powinny być takie same jak nazwy metod pobierających diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pt-BR.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pt-BR.xlf index 7fa87924cc..d34716aeb6 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pt-BR.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.pt-BR.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Acrescentar .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Substitua o sufixo '{0}' no nome de membro '{1}' pela alternativa sugerida '{2}' ou remova o sufixo por completo - - Flags enums should have plural names - Enumerações Flags devem ter nomes no plural - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Uma enumeração pública tem o atributo System.FlagsAttribute e seu nome não termina em ""s"". Tipos marcados usando FlagsAttribute têm nomes no plural, porque o atributo indica que mais de um valor pode ser especificado. - - - - Flags enums should have plural names - Enumerações Flags devem ter nomes no plural - - Identifiers should not match keywords Identificadores não devem corresponder a palavras-chave @@ -1317,21 +1292,6 @@ Renomeie o namespace {0} de forma que ele não fique mais em conflito com a palavra-chave reservada de linguagem '{1}'. Se você usar uma palavra-chave reservada como o nome de um namespace, ficará mais difícil para os consumidores de outras linguagens utilizarem o namespace. - - Only FlagsAttribute enums should have plural names - Apenas enumerações FlagsAttribute devem ter nomes no plural - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - As convenções de nomenclatura ditam que um nome no plural para uma enumeração indica que mais de um valor da enumeração pode ser especificado ao mesmo tempo. - - - - Only FlagsAttribute enums should have plural names - Apenas enumerações FlagsAttribute devem ter nomes no plural - - Property names should not match get methods Nomes de propriedades não devem corresponder a métodos get diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ru.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ru.xlf index e9e259b9fd..c91ad72220 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ru.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.ru.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Добавить .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ Либо замените суффикс "{0}" в имени члена "{1}" предложенной альтернативой "{2}", либо полностью удалите суффикс. - - Flags enums should have plural names - У перечислений флагов должны быть имена во множественном числе - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Общее перечисление имеет атрибут System.FlagsAttribute, а его имя не заканчивается на ""s"". Типы, помеченные с помощью FlagsAttribute, имеют имена во множественном числе, так как атрибут указывает, что можно задать несколько значений. - - - - Flags enums should have plural names - У перечислений флагов должны быть имена во множественном числе - - Identifiers should not match keywords Идентификаторы не должны совпадать с ключевыми словами @@ -1317,21 +1292,6 @@ Переименуйте пространство имен {0}, чтобы оно больше не находилось в конфликте с зарезервированным ключевым словом языка "{1}". Использование зарезервированного ключевого слова в качестве имени пространства имен затрудняет использование этого пространства имен потребителями в других языках. - - Only FlagsAttribute enums should have plural names - Только перечисления FlagsAttribute должны иметь имена во множественном числе - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - По соглашениям об именовании имя перечисления во множественном числе указывает, что одновременно можно задать несколько значений этого перечисления. - - - - Only FlagsAttribute enums should have plural names - Только перечисления FlagsAttribute должны иметь имена во множественном числе - - Property names should not match get methods Имена свойств не должны совпадать с именами методов get diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.tr.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.tr.xlf index a3d58752eb..76e8998b4c 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.tr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.tr.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) Ekle .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ {1} üye adındaki '{0}' sonekini önerilen '{2}' alternatifi ile değiştirin ya da soneki tamamen kaldırın - - Flags enums should have plural names - Bayrak sabit listeleri çoğul adlara sahip olmalıdır - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - Bir genel sabit listesi System.FlagsAttribute özniteliğine sahip ve adı ""s"" ile bitmiyor. FlagsAttribute kullanılarak işaretlenen türler, öznitelik birden fazla değerin belirtilebileceğini gösterdiğinden çoğul olan adlara sahip olur. - - - - Flags enums should have plural names - Bayrak sabit listeleri çoğul adlara sahip olmalıdır - - Identifiers should not match keywords Tanımlayıcılar anahtar sözcüklerle eşleşmemelidir @@ -1317,21 +1292,6 @@ {0} ad alanını, ayrılmış dil anahtar sözcüğü '{1}' ile çakışmayacak şekilde yeniden adlandırın. Bir ad alanının adı olarak ayrılmış bir anahtar sözcüğün kullanılması, diğer dillerde kullanıcıların ad alanını kullanmasını zorlaştırır. - - Only FlagsAttribute enums should have plural names - Yalnızca FlagsAttribute sabit listeleri çoğul adlara sahip olmalıdır - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - Adlandırma kurallarına göre bir sabit listesinin çoğul ada sahip olması, aynı anda birden çok sabit listesi değeri belirtilebileceğini gösterir. - - - - Only FlagsAttribute enums should have plural names - Yalnızca FlagsAttribute sabit listeleri çoğul adlara sahip olmalıdır - - Property names should not match get methods Özellik adları get yöntemleri ile eşleşmemelidir diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hans.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hans.xlf index 4f90779f9c..32fac40a49 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hans.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hans.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) 附加 .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ 要么将成员名称“{1}”中的后缀“{0}”替换为所建议的数值“{2}”,要么完全删除后缀 - - Flags enums should have plural names - Flags 枚举应采用复数形式的名称 - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - 公共枚举具有 System.FlagsAttribute 属性,且其名称不以 "s" 结尾。用 FlagsAttribute 标记的类型具有复数形式的名称,因为该属性表示可以指定多个值。 - - - - Flags enums should have plural names - Flags 枚举应采用复数形式的名称 - - Identifiers should not match keywords 标识符不应与关键字匹配 @@ -1317,21 +1292,6 @@ 重命名命名空间 {0},使它不再与保留的语言关键字“{1}”冲突。如果使用保留的关键字作为命名空间的名称,则会使其他语言的使用者很难使用该命名空间。 - - Only FlagsAttribute enums should have plural names - 只有 FlagsAttribute 枚举应采用复数形式的名称 - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - 命名惯例规定,枚举的复数形式名称表示可以同时指定枚举的多个值。 - - - - Only FlagsAttribute enums should have plural names - 只有 FlagsAttribute 枚举应采用复数形式的名称 - - Property names should not match get methods 属性名不应与 get 方法匹配 diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hant.xlf b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hant.xlf index c33f6cb72b..514a3c5bf7 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hant.xlf +++ b/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/xlf/MicrosoftCodeQualityAnalyzersResources.zh-Hant.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Append .ConfigureAwait(true) 附加 .ConfigureAwait(true) @@ -1272,21 +1262,6 @@ 以建議的替代項 '{2}' 取代成員名稱 '{1}' 中的尾碼 '{0}',或是完全移除尾碼 - - Flags enums should have plural names - 旗標列舉應使用複數名稱 - - - - A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. - 公用列舉具有 System.FlagsAttribute 屬性,且其名稱不會以 ""s"" 結尾。因為 FlagsAttribute 屬性表示可指定一個以上的值,所以使用該屬性所標記的類型,具有複數名稱。 - - - - Flags enums should have plural names - 旗標列舉應使用複數名稱 - - Identifiers should not match keywords 識別項不應該與關鍵字相符 @@ -1317,21 +1292,6 @@ 重新命名命名空間 {0} ,使其不再與保留的語言關鍵字 '{1}' 相衝突。將保留關鍵字用作為命名空間的名稱,會讓其他語言的消費者難以使用該命名空間。 - - Only FlagsAttribute enums should have plural names - 只有 FlagsAttribute 列舉應使用複數名稱 - - - - Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. - 依照命名慣例的要求,列舉若是複數的名稱,表示可以同時指定多個列舉值。 - - - - Only FlagsAttribute enums should have plural names - 只有 FlagsAttribute 列舉應使用複數名稱 - - Property names should not match get methods 屬性名稱不應與 get 方法相符 diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/AvoidStringBuilderPInvokeParameters.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/AvoidStringBuilderPInvokeParameters.cs index 9a67354707..4abb39c236 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/AvoidStringBuilderPInvokeParameters.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/AvoidStringBuilderPInvokeParameters.cs @@ -27,8 +27,7 @@ public sealed class AvoidStringBuilderPInvokeParametersAnalyzer : DiagnosticAnal RuleLevel.IdeHidden_BulkConfigurable, // Only for users explicitly targeting performance - addressing violation is non-trivial description: s_localizableDescription, isPortedFxCopRule: false, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.csproj b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.csproj deleted file mode 100644 index 7bc82219e7..0000000000 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Microsoft.NetCore.Analyzers.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - netstandard2.0 - $(DefineConstants),NET_CORE_ANALYZERS - - *$(MSBuildProjectFile)* - - - - - - - - - - - - - ResXFileCodeGenerator - - - - - - diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/MicrosoftNetCoreAnalyzersResources.resx b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/MicrosoftNetCoreAnalyzersResources.resx index 841003fd5e..1ac32ba8b0 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/MicrosoftNetCoreAnalyzersResources.resx +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/MicrosoftNetCoreAnalyzersResources.resx @@ -1,17 +1,17 @@  - @@ -1404,14 +1404,11 @@ Provide correct 'enum' argument to 'Enum.HasFlag' - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - For determining whether the object contains or not any items, prefer using 'IsEmpty' property rather than retrieving the number of items from the 'Count' property and comparing it to 0 or 1. - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty Prefer IsEmpty over Count @@ -1518,10 +1515,4 @@ '{0}' all versions This call site is reachable on: 'Windows' all versions. - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - Analyzer package has been deprecated - \ No newline at end of file diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidUnsealedAttributes.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidUnsealedAttributes.cs index 38ee6fe11d..cfe45194f7 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidUnsealedAttributes.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/AvoidUnsealedAttributes.cs @@ -28,8 +28,7 @@ public sealed class AvoidUnsealedAttributesAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotRaiseReservedExceptionTypes.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotRaiseReservedExceptionTypes.cs index 17573dceb8..9f9c07394c 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotRaiseReservedExceptionTypes.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/DoNotRaiseReservedExceptionTypes.cs @@ -61,8 +61,7 @@ public sealed class DoNotRaiseReservedExceptionTypesAnalyzer : DiagnosticAnalyze RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal static DiagnosticDescriptor ReservedRule = DiagnosticDescriptorHelper.Create(RuleId, s_localizableTitle, s_localizableMessageReserved, @@ -70,8 +69,7 @@ public sealed class DoNotRaiseReservedExceptionTypesAnalyzer : DiagnosticAnalyze RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); private static readonly SymbolDisplayFormat s_symbolDisplayFormat = new SymbolDisplayFormat(typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyStringComparison.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyStringComparison.cs index 16058a8dac..f81e1a0bf5 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyStringComparison.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/SpecifyStringComparison.cs @@ -34,8 +34,7 @@ public sealed class SpecifyStringComparisonAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_localizableCA1307Description, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); private static readonly LocalizableString s_localizableCA1310Title = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.SpecifyStringComparisonCA1310Title), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); private static readonly LocalizableString s_localizableCA1310Message = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.SpecifyStringComparisonCA1310Message), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseOrdinalStringComparison.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseOrdinalStringComparison.cs index 4d80056f95..59293cb92a 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseOrdinalStringComparison.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/UseOrdinalStringComparison.cs @@ -24,8 +24,7 @@ public abstract class UseOrdinalStringComparisonAnalyzer : DiagnosticAnalyzer RuleLevel.IdeHidden_BulkConfigurable, description: s_localizableDescription, isPortedFxCopRule: true, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); internal const string CompareMethodName = "Compare"; internal const string EqualsMethodName = "Equals"; diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/ApprovedCipherModeAnalyzer.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/ApprovedCipherModeAnalyzer.cs index 4eb702a9e8..fe3e13e12a 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/ApprovedCipherModeAnalyzer.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/ApprovedCipherModeAnalyzer.cs @@ -35,8 +35,7 @@ public sealed class ApprovedCipherModeAnalyzer : DiagnosticAnalyzer RuleLevel.Disabled, description: s_Description, isPortedFxCopRule: false, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs index 2c4bf8691a..10868cfade 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotSerializeTypeWithPointerFields.cs @@ -36,7 +36,6 @@ public sealed class DoNotSerializeTypeWithPointerFields : DiagnosticAnalyzer description: s_Description, isPortedFxCopRule: false, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isReportedAtCompilationEnd: true); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseAccountSAS.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseAccountSAS.cs index 349d573d02..d9c441c693 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseAccountSAS.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseAccountSAS.cs @@ -34,8 +34,7 @@ public sealed class DoNotUseAccountSAS : DiagnosticAnalyzer RuleLevel.Disabled, description: s_Description, isPortedFxCopRule: false, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseInsecureRandomness.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseInsecureRandomness.cs index e8721a35b7..9ab60f8f8e 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseInsecureRandomness.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/DoNotUseInsecureRandomness.cs @@ -34,8 +34,7 @@ public sealed class DoNotUseInsecureRandomness : DiagnosticAnalyzer RuleLevel.Disabled, description: s_Description, isPortedFxCopRule: false, - isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: false); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/Helpers/SecurityHelpers.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/Helpers/SecurityHelpers.cs index 615f45a507..45113b2e53 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/Helpers/SecurityHelpers.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/Helpers/SecurityHelpers.cs @@ -82,7 +82,6 @@ public static DiagnosticDescriptor CreateDiagnosticDescriptor( descriptionResourceStringName != null ? GetResourceString(resourceSource, descriptionResourceStringName) : null, isPortedFxCopRule, isDataflowRule, - isEnabledByDefaultInFxCopAnalyzers: ruleLevel != RuleLevel.Disabled, isReportedAtCompilationEnd: isReportedAtCompilationEnd); } diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/PotentialReferenceCycleInDeserializedObjectGraph.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/PotentialReferenceCycleInDeserializedObjectGraph.cs index f7353d9d03..2302fa6698 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/PotentialReferenceCycleInDeserializedObjectGraph.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/PotentialReferenceCycleInDeserializedObjectGraph.cs @@ -37,7 +37,6 @@ public sealed class PotentialReferenceCycleInDeserializedObjectGraph : Diagnosti description: s_Description, isPortedFxCopRule: false, isDataflowRule: false, - isEnabledByDefaultInFxCopAnalyzers: false, isReportedAtCompilationEnd: true); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseContainerLevelAccessPolicy.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseContainerLevelAccessPolicy.cs index 7831c85fc5..0144ce55ba 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseContainerLevelAccessPolicy.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseContainerLevelAccessPolicy.cs @@ -39,8 +39,7 @@ public sealed class UseContainerLevelAccessPolicy : DiagnosticAnalyzer RuleLevel.Disabled, description: s_Description, isPortedFxCopRule: false, - isDataflowRule: true, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: true); internal static ImmutableArray<(string nspace, string policyIdentifierName)> NamespaceAndPolicyIdentifierNamePairs = ImmutableArray.Create( ("Blob", "groupPolicyIdentifier"), diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseSharedAccessProtocolHttpsOnly.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseSharedAccessProtocolHttpsOnly.cs index 76724116ac..18d5fe1fc2 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseSharedAccessProtocolHttpsOnly.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Security/UseSharedAccessProtocolHttpsOnly.cs @@ -38,8 +38,7 @@ public sealed class UseSharedAccessProtocolHttpsOnly : DiagnosticAnalyzer RuleLevel.Disabled, description: s_Description, isPortedFxCopRule: false, - isDataflowRule: true, - isEnabledByDefaultInFxCopAnalyzers: false); + isDataflowRule: true); public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(Rule); diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlag.cs b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlag.cs index 0bda527be0..894740e0ae 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlag.cs +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlag.cs @@ -16,7 +16,6 @@ public sealed class ProvideCorrectArgumentToEnumHasFlag : DiagnosticAnalyzer private static readonly LocalizableString s_localizableTitle = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.ProvideCorrectArgumentToEnumHasFlagTitle), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); private static readonly LocalizableString s_localizableMessageDifferentType = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.ProvideCorrectArgumentToEnumHasFlagMessageDifferentType), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); - private static readonly LocalizableString s_localizableMessageNotFlags = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.ProvideCorrectArgumentToEnumHasFlagMessageNotFlags), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); private static readonly LocalizableString s_localizableDescription = new LocalizableResourceString(nameof(MicrosoftNetCoreAnalyzersResources.ProvideCorrectArgumentToEnumHasFlagDescription), MicrosoftNetCoreAnalyzersResources.ResourceManager, typeof(MicrosoftNetCoreAnalyzersResources)); internal static DiagnosticDescriptor DifferentTypeRule = DiagnosticDescriptorHelper.Create( @@ -29,17 +28,7 @@ public sealed class ProvideCorrectArgumentToEnumHasFlag : DiagnosticAnalyzer isPortedFxCopRule: false, isDataflowRule: false); - internal static DiagnosticDescriptor NotFlagsRule = DiagnosticDescriptorHelper.Create( - RuleId, - s_localizableTitle, - s_localizableMessageNotFlags, - DiagnosticCategory.Usage, - RuleLevel.IdeSuggestion, - description: s_localizableDescription, - isPortedFxCopRule: false, - isDataflowRule: false); - - public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(DifferentTypeRule, NotFlagsRule); + public override ImmutableArray SupportedDiagnostics => ImmutableArray.Create(DifferentTypeRule); public override void Initialize(AnalysisContext context) { @@ -54,26 +43,18 @@ public override void Initialize(AnalysisContext context) { var invocation = (IInvocationOperation)context.Operation; - if (invocation.TargetMethod.ContainingType.SpecialType != SpecialType.System_Enum || - invocation.Arguments.Length != 1 || - invocation.Instance == null || - invocation.TargetMethod.Name != "HasFlag" || - invocation.Arguments[0].Value is not IConversionOperation conversion || - invocation.Instance.Type == null || - invocation.Instance.Type.TypeKind == TypeKind.TypeParameter || - conversion.Operand.Type?.TypeKind == TypeKind.TypeParameter) - { - return; - } - - if (!invocation.Instance.Type.Equals(conversion.Operand.Type)) + if (invocation.TargetMethod.ContainingType.SpecialType == SpecialType.System_Enum && + invocation.Arguments.Length == 1 && + invocation.Instance != null && + invocation.TargetMethod.Name == "HasFlag" && + invocation.Arguments[0].Value is IConversionOperation conversion && + invocation.Instance.Type != null && + invocation.Instance.Type.TypeKind != TypeKind.TypeParameter && + conversion.Operand.Type?.TypeKind != TypeKind.TypeParameter && + !invocation.Instance.Type.Equals(conversion.Operand.Type)) { context.ReportDiagnostic(invocation.CreateDiagnostic(DifferentTypeRule, GetArgumentTypeName(conversion), invocation.Instance.Type.Name)); } - else if (flagsAttributeType != null && !invocation.Instance.Type.HasAttribute(flagsAttributeType)) - { - context.ReportDiagnostic(invocation.CreateDiagnostic(NotFlagsRule, invocation.Instance.Type.Name)); - } }, OperationKind.Invocation); }); } diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.cs.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.cs.xlf index 6fdbcf3f27..4f330f2b11 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.cs.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.cs.xlf @@ -12,16 +12,6 @@ Přidat atribut Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Zkontrolovat využití režimu šifrování s odborníky na kryptografii @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Při zjišťování, jestli objekt obsahuje nějaké položky, používejte spíše než Count vlastnost IsEmpty. + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Při zjišťování, jestli objekt obsahuje nějaké položky, používejte spíše než Count vlastnost IsEmpty. @@ -1702,11 +1692,6 @@ Typ argumentu {0} musí být stejný jako typ výčtu {1}. - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Toto volání vždy vrátí false, protože typ výčtu {0} není označený jako FlagsAttribute. - - Provide correct 'enum' argument to 'Enum.HasFlag' Poskytněte prosím do Enum.HasFlag správný argument enum diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.de.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.de.xlf index 290cd6420c..36cb249091 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.de.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.de.xlf @@ -12,16 +12,6 @@ Serializable-Attribut hinzufügen - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Verwendung des Verschlüsselungsmodus mit Kryptografieexperten überprüfen @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Verwenden Sie anstelle von "Count" die Eigenschaft "IsEmpty", um festzulegen, ob das Objekt Elemente enthält oder nicht. + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Verwenden Sie anstelle von "Count" die Eigenschaft "IsEmpty", um festzulegen, ob das Objekt Elemente enthält oder nicht. @@ -1702,11 +1692,6 @@ Der Argumenttyp, "{0}", stimmt nicht mit dem enum-Typ "{1}" überein. - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Dieser Aufruf gibt immer FALSE zurück, weil der enum-Typ "{0}" nicht mit "FlagsAttribute" gekennzeichnet ist. - - Provide correct 'enum' argument to 'Enum.HasFlag' Geben Sie das richtige enum-Argument für "Enum.HasFlag" an diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.es.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.es.xlf index fb1d3aa726..f0907ff42d 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.es.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.es.xlf @@ -12,16 +12,6 @@ Agregar el atributo Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Revisar el uso del modo de cifrado con expertos en criptografía @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Elija "IsEmpty" en vez de "Count" para determinar si el objeto contiene o no elementos. + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Elija "IsEmpty" en vez de "Count" para determinar si el objeto contiene o no elementos. @@ -1702,11 +1692,6 @@ El tipo de argumento, "{0}", debe ser igual que el tipo de enumeración "{1}". - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Esta llamada devolverá siempre "false" porque el tipo de enumeración "{0}" no está marcado con "FlagsAttribute" - - Provide correct 'enum' argument to 'Enum.HasFlag' Proporcione el argumento "enum" correcto para "Enum.HasFlag" diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.fr.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.fr.xlf index acb89e28b9..008bf55668 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.fr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.fr.xlf @@ -12,16 +12,6 @@ Ajouter l'attribut Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Passer en revue l'utilisation du mode de chiffrement avec des experts en chiffrement @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Préférez 'IsEmpty' à 'Count' pour déterminer si l'objet contient ou non des éléments + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Préférez 'IsEmpty' à 'Count' pour déterminer si l'objet contient ou non des éléments @@ -1702,11 +1692,6 @@ Le type d'argument, '{0}', doit être le même que le type enum '{1}' - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Cet appel retourne toujours 'false', car le type enum '{0}' n'est pas marqué avec 'FlagsAttribute' - - Provide correct 'enum' argument to 'Enum.HasFlag' Fournir l'argument 'enum' approprié à 'Enum.HasFlag' diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.it.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.it.xlf index 1e144ae0ec..a41fa959c6 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.it.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.it.xlf @@ -12,16 +12,6 @@ Aggiungere l'attributo Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Verificare l'utilizzo della modalità crittografia con esperti di crittografia @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Preferire 'IsEmpty' a 'Count' per determinare se l'oggetto contiene o meno elementi + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Preferire 'IsEmpty' a 'Count' per determinare se l'oggetto contiene o meno elementi @@ -1702,11 +1692,6 @@ Il tipo di argomento '{0}' deve essere uguale al tipo enumerazione '{1}' - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Questa chiamata restituirà sempre 'false' perché il tipo enumerazione '{0}' non è contrassegnato con 'FlagsAttribute' - - Provide correct 'enum' argument to 'Enum.HasFlag' Specificare l'argomento 'enum' corretto per 'Enum.HasFlag' diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ja.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ja.xlf index d71589b770..c01fafb0bd 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ja.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ja.xlf @@ -12,16 +12,6 @@ Serializable 属性を追加する - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts 暗号の専門家と暗号モードの使用を再検討する @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - オブジェクトに項目が含まれているかどうかを判断するには、'Count' より 'IsEmpty' を優先してください + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + オブジェクトに項目が含まれているかどうかを判断するには、'Count' より 'IsEmpty' を優先してください @@ -1702,11 +1692,6 @@ 引数の型 '{0}' は、列挙型 '{1}' と同じでなければなりません - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - 列挙型 '{0}' が 'FlagsAttribute' でマークされていないため、この呼び出しは常に 'false' を返します - - Provide correct 'enum' argument to 'Enum.HasFlag' 'Enum.HasFlag' に正しい 'enum' 引数を指定する diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ko.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ko.xlf index 3d3f6e9687..afd36c0b07 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ko.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ko.xlf @@ -12,16 +12,6 @@ Serializable 특성 추가 - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts 암호화 전문가와 암호화 모드 사용 현황 검토 @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - 개체에 항목이 포함되어 있는지 확인하려면 'Count' 대신 'IsEmpty'를 사용하세요. + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + 개체에 항목이 포함되어 있는지 확인하려면 'Count' 대신 'IsEmpty'를 사용하세요. @@ -1702,11 +1692,6 @@ 인수 형식 '{0}'은(는) 열거형 형식 '{1}'과(와) 같아야 합니다. - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - 열거형 형식 '{0}'이(가) 'FlagsAttribute'로 표시되지 않아 이 호출은 항상 'false'를 반환합니다. - - Provide correct 'enum' argument to 'Enum.HasFlag' 'Enum.HasFlag'에 올바른 'enum' 인수 제공 diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pl.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pl.xlf index fdab242883..6a7ab8b276 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pl.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pl.xlf @@ -12,16 +12,6 @@ Dodaj atrybut Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Przejrzyj użycie trybu szyfrowania wspólnie z ekspertami od kryptografii @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Preferuj właściwość „IsEmpty” przed właściwością „Count” do określania, czy obiekt zawiera elementy + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Preferuj właściwość „IsEmpty” przed właściwością „Count” do określania, czy obiekt zawiera elementy @@ -1702,11 +1692,6 @@ Typ argumentu „{0}” musi być taki sam jak typ wyliczenia „{1}”. - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - To wywołanie będzie zawsze zwracać wartość „false”, ponieważ typ wyliczenia „{0}” nie jest oznaczony przy użyciu elementu „FlagsAttribute” - - Provide correct 'enum' argument to 'Enum.HasFlag' Podaj poprawny argument „enum” dla elementu „Enum.HasFlag” diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pt-BR.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pt-BR.xlf index 014167b6bc..a638ee0778 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pt-BR.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.pt-BR.xlf @@ -12,16 +12,6 @@ Adicionar o atributo Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Examine o uso do modo de criptografia com especialistas em criptografia @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Preferir 'IsEmpty' em vez de 'Count' para determinar se o objeto contém ou não contém itens + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Preferir 'IsEmpty' em vez de 'Count' para determinar se o objeto contém ou não contém itens @@ -1702,11 +1692,6 @@ O tipo de argumento '{0}' precisa ser do mesmo tipo enumerado '{1}' - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Esta chamada sempre retornará 'false', pois o tipo enumerado '{0}' não está marcado com 'FlagsAttribute' - - Provide correct 'enum' argument to 'Enum.HasFlag' Forneça o argumento 'enum' correto para 'Enum.HasFlag' diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ru.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ru.xlf index 5724367fae..6906dff693 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ru.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.ru.xlf @@ -12,16 +12,6 @@ Добавить атрибут Serializable - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Проверьте используемый режим шифрования с экспертами по криптографии @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Старайтесь использовать "IsEmpty" вместо "Count", чтобы определить, содержит ли объект другие элементы + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Старайтесь использовать "IsEmpty" вместо "Count", чтобы определить, содержит ли объект другие элементы @@ -1702,11 +1692,6 @@ Тип аргумента "{0}" не совпадает с типом перечисления "{1}". - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - Этот вызов будет всегда возвращать "false", так как тип перечисления "{0}" не помечен как "FlagsAttribute" - - Provide correct 'enum' argument to 'Enum.HasFlag' Укажите правильный аргумент "enum" для "Enum.HasFlag" diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.tr.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.tr.xlf index 918e7d7372..a4eaac6445 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.tr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.tr.xlf @@ -12,16 +12,6 @@ Serileştirilebilir öznitelik ekle - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts Şifreleme uzmanları ile şifreleme modu kullanımını gözden geçirin @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - Nesnenin öğe içerip içermediğini belirlemek için 'Count' yerine 'IsEmpty' tercih edin + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + Nesnenin öğe içerip içermediğini belirlemek için 'Count' yerine 'IsEmpty' tercih edin @@ -1702,11 +1692,6 @@ '{0}' bağımsız değişken türü, '{1}' sabit listesi türüyle aynı olmalıdır. - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - '{0}' sabit listesi türü 'FlagsAttribute' ile işaretlenmediğinden bu çağrı her zaman 'false' döndürür - - Provide correct 'enum' argument to 'Enum.HasFlag' 'Enum.HasFlag' için doğru 'sabit listesi' bağımsız değişkenini belirtin diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hans.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hans.xlf index f9d92bb27e..75206d453a 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hans.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hans.xlf @@ -12,16 +12,6 @@ 添加 Serializable 特性 - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts 与加密专家一起审阅密码模式使用情况 @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - 最好使用 "IsEmpty" (而不是 "Count")来确定对象是否包含项 + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + 最好使用 "IsEmpty" (而不是 "Count")来确定对象是否包含项 @@ -1702,11 +1692,6 @@ 参数类型“{0}”必须与枚举类型“{1}”相同。 - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - 此调用将始终返回 "false",因为枚举类型“{0}”未使用 "FlagsAttribute" 进行标记 - - Provide correct 'enum' argument to 'Enum.HasFlag' 向 "Enum.HasFlag" 提供正确的 "enum" 参数 diff --git a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hant.xlf b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hant.xlf index 6c64f7a523..62f7e172a4 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hant.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/xlf/MicrosoftNetCoreAnalyzersResources.zh-Hant.xlf @@ -12,16 +12,6 @@ 新增可序列化屬性 - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Review cipher mode usage with cryptography experts 與加密專家一同審查 Cipher 模式使用方式 @@ -1618,8 +1608,8 @@ - Prefer 'IsEmpty' over 'Count' to determine whether the object contains or not any items - 若要判斷物件是否包含項目,建議使用 'IsEmpty',而不要使用 'Count' + Prefer 'IsEmpty' over 'Count' to determine whether the object is empty + 若要判斷物件是否包含項目,建議使用 'IsEmpty',而不要使用 'Count' @@ -1702,11 +1692,6 @@ 引數類型 '{0}' 與列舉類型 '{1}' 必須相同 - - This call will always returns 'false' because the enum type '{0}' is not marked with 'FlagsAttribute' - 因為列舉類型 '{0}' 未標記 'FlagsAttribute',所以此呼叫將一律會傳回 'False' - - Provide correct 'enum' argument to 'Enum.HasFlag' 為 'Enum.HasFlag' 提供正確的 'Enum' 引數 diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.csproj b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.csproj deleted file mode 100644 index a82e6071c3..0000000000 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.Analyzers.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - netstandard2.0 - $(DefineConstants),NET_FRAMEWORK_ANALYZERS - - *$(MSBuildProjectFile)* - - - - - - - - - - - - diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/MicrosoftNetFrameworkAnalyzersResources.resx b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/MicrosoftNetFrameworkAnalyzersResources.resx index ff49b712c0..c5b04f8c05 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/MicrosoftNetFrameworkAnalyzersResources.resx +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/MicrosoftNetFrameworkAnalyzersResources.resx @@ -373,10 +373,4 @@ Missing ValidateAntiForgeryTokenAttribute on controller action {0} - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - Analyzer package has been deprecated - \ No newline at end of file diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.cs.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.cs.xlf index 881b5cb180..1404056a2a 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.cs.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.cs.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Zadejte MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.de.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.de.xlf index 96545a7e15..73236eaf4f 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.de.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.de.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions MessageBoxOptions angeben diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.es.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.es.xlf index 87e29b23fd..db061c81e5 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.es.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.es.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Especificar MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.fr.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.fr.xlf index ab5c5aa6c5..8aa0fcfe98 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.fr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.fr.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Spécifier MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.it.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.it.xlf index 19e7948395..729f776bd3 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.it.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.it.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Specificare MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ja.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ja.xlf index 40a3e94a2b..7d553d5c60 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ja.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ja.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions MessageBoxOptions を指定します diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ko.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ko.xlf index 1adb633c8b..2486357f83 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ko.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ko.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions MessageBoxOptions를 지정하세요. diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pl.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pl.xlf index fe5286210c..b548fe11ca 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pl.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pl.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Określ argument MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pt-BR.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pt-BR.xlf index ebd5b21e94..881e63d4a8 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pt-BR.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.pt-BR.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Especificar MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ru.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ru.xlf index 7ac89fb937..11ef1073da 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ru.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.ru.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions Укажите MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.tr.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.tr.xlf index dabd0abde9..3660b169d9 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.tr.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.tr.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions MessageBoxOptions belirtin diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hans.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hans.xlf index dec2b25844..e8ef28d52d 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hans.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hans.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions 指定 MessageBoxOptions diff --git a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hant.xlf b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hant.xlf index 0a8bab56f8..edea4b960c 100644 --- a/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hant.xlf +++ b/src/NetAnalyzers/Core/Microsoft.NetFramework.Analyzers/xlf/MicrosoftNetFrameworkAnalyzersResources.zh-Hant.xlf @@ -2,16 +2,6 @@ - - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - FxCopAnalyzers package has been deprecated in favor of 'Microsoft.CodeAnalysis.NetAnalyzers', that ships with the .NET SDK. Please refer to https://docs.microsoft.com/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers to migrate to .NET analyzers. - - - - Analyzer package has been deprecated - Analyzer package has been deprecated - - Specify MessageBoxOptions 指定 MessageBoxOptions diff --git a/src/NetAnalyzers/Directory.Build.props b/src/NetAnalyzers/Directory.Build.props index 0a650a704a..2f2081471a 100644 --- a/src/NetAnalyzers/Directory.Build.props +++ b/src/NetAnalyzers/Directory.Build.props @@ -3,14 +3,10 @@ - true - true - - $(DefineConstants),FXCOP_ANALYZERS - $(DefineConstants),NET_ANALYZERS + $(DefineConstants),NET_ANALYZERS - $(NetAnalyzersVersionPrefix) - $(NetAnalyzersPreReleaseVersionLabel) + $(NetAnalyzersVersionPrefix) + $(NetAnalyzersPreReleaseVersionLabel) diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj b/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj index 447f0f59ab..9feef642b0 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeAnalysis.NetAnalyzers.UnitTests.csproj @@ -5,9 +5,6 @@ $(DefineConstants),NET_ANALYZERS_TEST true - - - diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLastTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLastTests.cs index 8e273dd4de..e39ce224d2 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLastTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/CancellationTokenParametersMustComeLastTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Threading.Tasks; +using Microsoft.CodeAnalysis.Testing; using Test.Utilities; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< @@ -519,5 +520,99 @@ End Class" }, }.RunAsync(); } + + [Theory, WorkItem(4467, "https://github.com/dotnet/roslyn-analyzers/issues/4467")] + // No configuration - validate diagnostics in default configuration + [InlineData(@"")] + // Exclude all ctors + [InlineData(@"dotnet_code_quality.excluded_symbol_names = .ctor")] + // Exclude all members starting with C + [InlineData(@"dotnet_code_quality.excluded_symbol_names = C*")] + // Exclude classes C1 and C2 + [InlineData(@"dotnet_code_quality.excluded_symbol_names = T:C1|T:C2")] + public async Task CA1068_ExcludedSymbolNames_Diagnostic(string editorConfigText) + { + var prefix = editorConfigText.Length == 0 ? "[|" : ""; + var suffix = editorConfigText.Length == 0 ? "|]" : ""; + + await new VerifyCS.Test + { + TestState = + { + Sources = + { + @" +using System.Threading; + +public class C1 +{ + public " + prefix + "C1" + suffix + @"(CancellationToken t, int i) {} + + public " + prefix + "C1" + suffix + @"(CancellationToken t, float f) {} +} + +public class C2 +{ + public " + prefix + "C2" + suffix + @"(CancellationToken t, int i) {} +}" + }, + AdditionalFiles = { (".editorconfig", editorConfigText) } + }, + }.RunAsync(); + + await new VerifyVB.Test + { + TestState = + { + Sources = + { + $@" +Imports System.Threading + +Public Class C1 + Public Sub " + prefix + "New" + suffix + @"(t As CancellationToken, i As Integer) + End Sub + + Public Sub " + prefix + "New" + suffix + @"(t As CancellationToken, i As Single) + End Sub +End Class + +Public Class C2 + Public Sub " + prefix + "New" + suffix + @"(t As CancellationToken, i As Integer) + End Sub +End Class" + }, + AdditionalFiles = { (".editorconfig", editorConfigText) } + }, + }.RunAsync(); + } + + [Theory, WorkItem(4467, "https://github.com/dotnet/roslyn-analyzers/issues/4467")] + // No configuration - validate diagnostics in default configuration + [InlineData(@"")] + // Exclude all ctors + [InlineData(@"dotnet_code_quality.excluded_symbol_names = .ctor")] + public async Task CA1068_ExcludedSymbolNames_Record_NoDiagnostic(string editorConfigText) + { + var prefix = editorConfigText.Length == 0 ? "[|" : ""; + var suffix = editorConfigText.Length == 0 ? "|]" : ""; + + await new VerifyCS.Test + { + LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, + ReferenceAssemblies = ReferenceAssemblies.Net.Net50, + TestState = + { + Sources = + { + @" +using System.Threading; + +public record " + prefix + "R" + suffix + @"(CancellationToken t, int i) {}" + }, + AdditionalFiles = { (".editorconfig", editorConfigText) } + }, + }.RunAsync(); + } } } diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypesTests.Fixer.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypesTests.Fixer.cs index 54dd282754..fc6a1c2904 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypesTests.Fixer.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/InterfaceMethodsShouldBeCallableByChildTypesTests.Fixer.cs @@ -1,9 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#pragma warning disable IDE0055 // Formatting analyzer complains about bad formatting when "BUILDING_VSIX = true". Fixing the formatting leads to it complaining about bad formatting when "BUILDING_VSIX = false". - -#if !BUILDING_VSIX // Analyzer not supported in the Microsoft CodeAnalysis (FxCop analyzers) VSIX - using System.Threading.Tasks; using Test.Utilities; using Xunit; @@ -1215,6 +1211,4 @@ End Class #endregion } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/TypesThatOwnDisposableFieldsShouldBeDisposableTests.Fixer.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/TypesThatOwnDisposableFieldsShouldBeDisposableTests.Fixer.cs index a9698446ea..b8783d8374 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/TypesThatOwnDisposableFieldsShouldBeDisposableTests.Fixer.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/TypesThatOwnDisposableFieldsShouldBeDisposableTests.Fixer.cs @@ -1,7 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if !BUILDING_VSIX // Analyzer not supported in the Microsoft CodeAnalysis (FxCop analyzers) VSIX - using System.Threading.Tasks; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< @@ -234,6 +232,4 @@ End Class "); } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs index 3fc6315775..3b21ae6913 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/Maintainability/AvoidDeadConditionalCode_NullAnalysis.cs @@ -6936,6 +6936,99 @@ If p is Nothing Then End If End Sub End Class +"); + } + + [Trait(Traits.DataflowAnalysis, Traits.Dataflow.NullAnalysis)] + [Fact] + [WorkItem(4509, "https://github.com/dotnet/roslyn-analyzers/issues/4509")] + public async Task GenericFieldNullCheckIsNotFlagged() + { + await VerifyCS.VerifyAnalyzerAsync(@" +public class MyClass +{ + private T m_myValue; + + public void M() + { + var x = this.m_myValue?.ToString(); + } +}"); + + await VerifyVB.VerifyAnalyzerAsync(@" +Public Class [MyClass](Of T) + Private m_myValue As T + + Public Sub M() + Dim x = Me.m_myValue?.ToString() + End Sub +End Class +"); + } + + [Trait(Traits.DataflowAnalysis, Traits.Dataflow.NullAnalysis)] + [Fact] + [WorkItem(4548, "https://github.com/dotnet/roslyn-analyzers/issues/4548")] + public async Task ActivatorCreateInstanceNullCheckIsNotFlagged() + { + await VerifyCS.VerifyAnalyzerAsync(@" +using System; + +public class C +{ + public void M() + { + var value = Activator.CreateInstance(typeof(int?)); + if (value is null) + { + } + } +}"); + + await VerifyVB.VerifyAnalyzerAsync(@" +Imports System + +Public Class C + Public Sub M() + Dim value = Activator.CreateInstance(GetType(Integer?)) + + If value Is Nothing Then + End If + End Sub +End Class +"); + } + + [Trait(Traits.DataflowAnalysis, Traits.Dataflow.NullAnalysis)] + [Fact] + [WorkItem(4548, "https://github.com/dotnet/roslyn-analyzers/issues/4548")] + public async Task FactoryMethodWithNullableReturnIsNotFlagged() + { + await new VerifyCS.Test + { + TestCode = @" +using System; + +#nullable enable + +public class C +{ + public void M(bool flag) + { + var value = CreateC(flag); + if (value is null) + { + } + } + + public static C? CreateC(bool flag) + { + return flag ? new C() : null; + } +}", + LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp8, + }.RunAsync(); + await VerifyCS.VerifyAnalyzerAsync(@" "); } } diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfacesTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfacesTests.cs index f91f47d9cb..26a6b65230 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfacesTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/SealMethodsThatSatisfyPrivateInterfacesTests.cs @@ -467,6 +467,46 @@ End Class // sealed overrides - no diagnostic + [Fact, WorkItem(4566, "https://github.com/dotnet/roslyn-analyzers/issues/4566")] + public async Task CA2119_BaseClassInterface_NoDiagnostic() + { + await VerifyCS.VerifyAnalyzerAsync(@" +namespace NS +{ + internal interface IInternal + { + void Method1(); + } + + public class C : IInternal + { + public virtual void [|Method1|]() { } + } + + public class InheritFromC : C + { + } +}"); + + await VerifyVB.VerifyAnalyzerAsync(@" +Namespace NS + Friend Interface IInternal + Sub Method1() + End Interface + + Public Class C + Implements IInternal + + Public Overridable Sub [|Method1|]() Implements IInternal.Method1 + End Sub + End Class + + Public Class InheritFromC + Inherits C + End Class +End Namespace"); + } + private static DiagnosticResult GetCSharpResultAt(int line, int column) => VerifyCS.Diagnostic() .WithLocation(line, column); diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriateTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriateTests.cs index 53884a3016..75f5bce5f6 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriateTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/QualityGuidelines/UseLiteralsWhereAppropriateTests.cs @@ -7,10 +7,10 @@ using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< Microsoft.CodeQuality.Analyzers.QualityGuidelines.UseLiteralsWhereAppropriateAnalyzer, - Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>; + Microsoft.CodeQuality.CSharp.Analyzers.QualityGuidelines.CSharpUseLiteralsWhereAppropriateFixer>; using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier< Microsoft.CodeQuality.Analyzers.QualityGuidelines.UseLiteralsWhereAppropriateAnalyzer, - Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>; + Microsoft.CodeQuality.VisualBasic.Analyzers.QualityGuidelines.BasicUseLiteralsWhereAppropriateFixer>; namespace Microsoft.CodeQuality.Analyzers.QualityGuidelines.UnitTests { @@ -169,6 +169,80 @@ End Class await vbTest.RunAsync(); } + [Fact] + public async Task CA1802_CSharp_IntPtr_UIntPtr_NoDiagnostic() + { + await new VerifyCS.Test + { + LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, + ReferenceAssemblies = ReferenceAssemblies.Net.Net50, + TestCode = @" +using System; + +public class Class1 +{ + internal static readonly IntPtr field1 = (nint)0; + internal static readonly UIntPtr field2 = (nuint)0; +}", + }.RunAsync(); + } + + [Fact] + public async Task CA1802_CSharp_nint_Diagnostic() + { + await new VerifyCS.Test + { + LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, + ReferenceAssemblies = ReferenceAssemblies.Net.Net50, + TestCode = @" +using System; + +public class Class1 +{ + internal static readonly nint field = (nint)0; +}", + ExpectedDiagnostics = + { + GetCSharpDefaultResultAt(6, 35, "field"), + }, + FixedCode = @" +using System; + +public class Class1 +{ + internal const nint field = (nint)0; +}", + }.RunAsync(); + } + + [Fact] + public async Task CA1802_CSharp_nuint_Diagnostic() + { + await new VerifyCS.Test + { + LanguageVersion = CodeAnalysis.CSharp.LanguageVersion.CSharp9, + ReferenceAssemblies = ReferenceAssemblies.Net.Net50, + TestCode = @" +using System; + +public class Class1 +{ + internal static readonly nuint field = (nuint)0; +}", + ExpectedDiagnostics = + { + GetCSharpDefaultResultAt(6, 36, "field"), + }, + FixedCode = @" +using System; + +public class Class1 +{ + internal const nuint field = (nuint)0; +}", + }.RunAsync(); + } + private static DiagnosticResult GetCSharpDefaultResultAt(int line, int column, string symbolName) => VerifyCS.Diagnostic(UseLiteralsWhereAppropriateAnalyzer.DefaultRule) .WithLocation(line, column) @@ -189,4 +263,4 @@ private static DiagnosticResult GetBasicEmptyStringResultAt(int line, int column .WithLocation(line, column) .WithArguments(symbolName); } -} \ No newline at end of file +} diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Performance/UseCountProperlyTests.Data.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Performance/UseCountProperlyTests.Data.cs index 93843a11c2..0c2b409102 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Performance/UseCountProperlyTests.Data.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Performance/UseCountProperlyTests.Data.cs @@ -62,12 +62,12 @@ public IEnumerator GetEnumerator() private static readonly List _operators = new List { - new OperatorKind((a,b) => a == b, 1, 2, BinaryOperatorKind.Equals), - new OperatorKind((a,b) => a != b, 2, 2, BinaryOperatorKind.NotEquals), - new OperatorKind((a,b) => a > b, 1, 1, BinaryOperatorKind.GreaterThan), - new OperatorKind((a,b) => a >= b, 2, 2, BinaryOperatorKind.GreaterThanOrEqual), - new OperatorKind((a,b) => a < b, 1, 1, BinaryOperatorKind.LessThan), - new OperatorKind((a,b) => a <= b, 2, 2, BinaryOperatorKind.LessThanOrEqual), + new OperatorKind((a, b) => a == b, 1, 2, BinaryOperatorKind.Equals), + new OperatorKind((a, b) => a != b, 2, 2, BinaryOperatorKind.NotEquals), + new OperatorKind((a, b) => a > b, 1, 1, BinaryOperatorKind.GreaterThan), + new OperatorKind((a, b) => a >= b, 2, 2, BinaryOperatorKind.GreaterThanOrEqual), + new OperatorKind((a, b) => a < b, 1, 1, BinaryOperatorKind.LessThan), + new OperatorKind((a, b) => a <= b, 2, 2, BinaryOperatorKind.LessThanOrEqual), }; } diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/TestForNaNCorrectlyTests.Fixer.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/TestForNaNCorrectlyTests.Fixer.cs index fec8ec46b0..328414cfe0 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/TestForNaNCorrectlyTests.Fixer.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/TestForNaNCorrectlyTests.Fixer.cs @@ -1,7 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if !BUILDING_VSIX // Analyzer not supported in the Microsoft CodeAnalysis (FxCop analyzers) VSIX - using System.Threading.Tasks; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< @@ -546,6 +544,4 @@ public void F() "); } } -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Security/ReviewCodeForSqlInjectionVulnerabilitiesTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Security/ReviewCodeForSqlInjectionVulnerabilitiesTests.cs index 5724dc08a6..885b7deef5 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Security/ReviewCodeForSqlInjectionVulnerabilitiesTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Security/ReviewCodeForSqlInjectionVulnerabilitiesTests.cs @@ -3665,6 +3665,25 @@ public void DoSomething(string input) await csharpTest.RunAsync(); } + [Fact] + public async Task AspNetMvcController_HasPropertySetter() + { + await VerifyCSharpWithDependenciesAsync(@" +using System.Data.SqlClient; + +public class MyController +{ + public void DoSomething(string input) + { + } + + public string AString + { + set { _ = value; } + } +}"); + } + [Fact] public async Task TaintFunctionArguments() { diff --git a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlagTests.cs b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlagTests.cs index 6cb9fb97f9..6e783d75eb 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlagTests.cs +++ b/src/NetAnalyzers/UnitTests/Microsoft.NetCore.Analyzers/Usage/ProvideCorrectArgumentToEnumHasFlagTests.cs @@ -104,10 +104,9 @@ public enum MyEnum { A, B, } public void Method(MyEnum m) { - {|#0:m.HasFlag(MyEnum.A)|}; + m.HasFlag(MyEnum.A); } -}", - VerifyCS.Diagnostic(ProvideCorrectArgumentToEnumHasFlag.NotFlagsRule).WithLocation(0).WithArguments("MyEnum")); +}"); await VerifyVB.VerifyAnalyzerAsync(@" Imports System @@ -119,11 +118,10 @@ Public Enum MyEnum End Enum Public Sub Method(ByVal m As MyEnum) - {|#0:m.HasFlag(MyEnum.A)|} + m.HasFlag(MyEnum.A) End Sub End Class -", - VerifyVB.Diagnostic(ProvideCorrectArgumentToEnumHasFlag.NotFlagsRule).WithLocation(0).WithArguments("MyEnum")); +"); } [Fact] diff --git a/src/NetAnalyzers/VisualBasic/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.VisualBasic.Analyzers.vbproj b/src/NetAnalyzers/VisualBasic/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.VisualBasic.Analyzers.vbproj deleted file mode 100644 index cbedb73a3d..0000000000 --- a/src/NetAnalyzers/VisualBasic/Microsoft.CodeQuality.Analyzers/Microsoft.CodeQuality.VisualBasic.Analyzers.vbproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - - - - - - - - \ No newline at end of file diff --git a/src/NetAnalyzers/VisualBasic/Microsoft.NetCore.Analyzers/Microsoft.NetCore.VisualBasic.Analyzers.vbproj b/src/NetAnalyzers/VisualBasic/Microsoft.NetCore.Analyzers/Microsoft.NetCore.VisualBasic.Analyzers.vbproj deleted file mode 100644 index 780b0c5563..0000000000 --- a/src/NetAnalyzers/VisualBasic/Microsoft.NetCore.Analyzers/Microsoft.NetCore.VisualBasic.Analyzers.vbproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0 - - - - - - - - \ No newline at end of file diff --git a/src/NetAnalyzers/VisualBasic/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.VisualBasic.Analyzers.vbproj b/src/NetAnalyzers/VisualBasic/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.VisualBasic.Analyzers.vbproj deleted file mode 100644 index b44af07dd8..0000000000 --- a/src/NetAnalyzers/VisualBasic/Microsoft.NetFramework.Analyzers/Microsoft.NetFramework.VisualBasic.Analyzers.vbproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - netstandard2.0 - - - - - \ No newline at end of file diff --git a/src/Text.Analyzers/Core/AnalyzerReleases.Unshipped.md b/src/Text.Analyzers/Core/AnalyzerReleases.Unshipped.md index cdf4f1397e..daa535e823 100644 --- a/src/Text.Analyzers/Core/AnalyzerReleases.Unshipped.md +++ b/src/Text.Analyzers/Core/AnalyzerReleases.Unshipped.md @@ -1 +1,7 @@ ; Please do not edit this file manually, it should only be updated through code fix application. + +### New Rules +Rule ID | Category | Severity | Notes +--------|----------|----------|------- +CA1714 | Naming | Disabled | EnumsShouldHavePluralNamesAnalyzer, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714) +CA1717 | Naming | Disabled | EnumsShouldHavePluralNamesAnalyzer, [Documentation](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717) \ No newline at end of file diff --git a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNames.cs b/src/Text.Analyzers/Core/EnumsShouldHavePluralNames.cs similarity index 74% rename from src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNames.cs rename to src/Text.Analyzers/Core/EnumsShouldHavePluralNames.cs index 7541266b6f..de8ff08763 100644 --- a/src/NetAnalyzers/Core/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNames.cs +++ b/src/Text.Analyzers/Core/EnumsShouldHavePluralNames.cs @@ -1,9 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -// Enable "Humanizer" based rules only in FxCopAnalyzers package. -// We do not have separate tests for FxCopAnalyzers package, so also keep it enabled for NetAnalyzers test project to retain test coverage. -#if FXCOP_ANALYZERS || NET_ANALYZERS_TEST - #nullable enable using System; @@ -15,9 +11,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; -#pragma warning disable RS1029 // Do not use reserved diagnostic IDs. - fires for this analyzer file included in unit test project. - -namespace Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines +namespace Text.Analyzers { /// /// CA1714: Flags enums should have plural names @@ -30,21 +24,21 @@ public sealed class EnumsShouldHavePluralNamesAnalyzer : DiagnosticAnalyzer private static readonly LocalizableString s_localizableTitle_CA1714 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.FlagsEnumsShouldHavePluralNamesTitle), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.FlagsEnumsShouldHavePluralNamesTitle), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); private static readonly LocalizableString s_localizableMessage_CA1714 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.FlagsEnumsShouldHavePluralNamesMessage), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.FlagsEnumsShouldHavePluralNamesMessage), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); private static readonly LocalizableString s_localizableDescription_CA1714 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.FlagsEnumsShouldHavePluralNamesDescription), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.FlagsEnumsShouldHavePluralNamesDescription), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); internal static DiagnosticDescriptor Rule_CA1714 = DiagnosticDescriptorHelper.Create( @@ -61,21 +55,21 @@ public sealed class EnumsShouldHavePluralNamesAnalyzer : DiagnosticAnalyzer private static readonly LocalizableString s_localizableTitle_CA1717 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesTitle), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesTitle), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); private static readonly LocalizableString s_localizableMessage_CA1717 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesMessage), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesMessage), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); private static readonly LocalizableString s_localizableDescription_CA1717 = new LocalizableResourceString( - nameof(MicrosoftCodeQualityAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesDescription), - MicrosoftCodeQualityAnalyzersResources.ResourceManager, - typeof(MicrosoftCodeQualityAnalyzersResources)); + nameof(TextAnalyzersResources.OnlyFlagsEnumsShouldHavePluralNamesDescription), + TextAnalyzersResources.ResourceManager, + typeof(TextAnalyzersResources)); internal static DiagnosticDescriptor Rule_CA1717 = DiagnosticDescriptorHelper.Create( @@ -155,6 +149,4 @@ private static void AnalyzeSymbol(SymbolAnalysisContext context, INamedTypeSymbo private static bool IsPlural(string word) => word.Equals(word.Pluralize(inputIsKnownToBeSingular: false), StringComparison.OrdinalIgnoreCase); } -} - -#endif +} \ No newline at end of file diff --git a/src/Text.Analyzers/Core/Text.Analyzers.csproj b/src/Text.Analyzers/Core/Text.Analyzers.csproj index 7ad8dd4bce..ae2e6fa0cc 100644 --- a/src/Text.Analyzers/Core/Text.Analyzers.csproj +++ b/src/Text.Analyzers/Core/Text.Analyzers.csproj @@ -12,6 +12,7 @@ + diff --git a/src/Text.Analyzers/Core/TextAnalyzersResources.resx b/src/Text.Analyzers/Core/TextAnalyzersResources.resx index ce135f82ed..5fa2ec2178 100644 --- a/src/Text.Analyzers/Core/TextAnalyzersResources.resx +++ b/src/Text.Analyzers/Core/TextAnalyzersResources.resx @@ -117,6 +117,24 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Flags enums should have plural names + + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + Flags enums should have plural names + + + Only FlagsAttribute enums should have plural names + + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + Only FlagsAttribute enums should have plural names + Identifiers should be spelled correctly diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.cs.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.cs.xlf index 8b45d88bd6..758afb7f28 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.cs.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.cs.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Identifikátory nesmí obsahovat pravopisné chyby @@ -97,6 +112,21 @@ Pojmenování + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.de.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.de.xlf index c400bf61cc..00af14aa39 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.de.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.de.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Bezeichner müssen richtig geschrieben werden @@ -97,6 +112,21 @@ Benennung + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.es.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.es.xlf index 12e0322442..3d4cfa6c00 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.es.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.es.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Los identificadores deben estar escritos correctamente. @@ -97,6 +112,21 @@ Nomenclatura + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.fr.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.fr.xlf index d6051030a4..e1bb846fd9 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.fr.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.fr.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly L'orthographe des identificateurs doit être correcte @@ -97,6 +112,21 @@ Nommage + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.it.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.it.xlf index 8bda0e6488..c4cc9f546b 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.it.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.it.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly L'ortografia degli identificatori deve essere corretta @@ -97,6 +112,21 @@ Denominazione + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ja.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ja.xlf index c772aea4b4..d356d59964 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ja.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ja.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly 識別子は正しく入力されなければなりません @@ -97,6 +112,21 @@ 名前付け + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ko.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ko.xlf index f86f9a6a2f..9c5f309e5b 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ko.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ko.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly 식별자의 맞춤법이 정확해야 합니다. @@ -97,6 +112,21 @@ 명명 + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pl.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pl.xlf index b4ffd0eb36..69c1f49e74 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pl.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pl.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Pisownia identyfikatorów powinna być poprawna @@ -97,6 +112,21 @@ Nazewnictwo + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pt-BR.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pt-BR.xlf index 99fd1499df..8c2e62f71d 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pt-BR.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.pt-BR.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Identificadores devem ter grafia correta @@ -97,6 +112,21 @@ Nomenclatura + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ru.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ru.xlf index 39d43107c9..5ac0ae4dce 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ru.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.ru.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Идентификаторы должны иметь правильное правописание @@ -97,6 +112,21 @@ Именование + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.tr.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.tr.xlf index 14701f0288..254c77a525 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.tr.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.tr.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly Tanımlayıcıların doğru yazılması gerekir @@ -97,6 +112,21 @@ Adlandırma + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hans.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hans.xlf index 88ffdfc409..8dc27a3b27 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hans.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hans.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly 标识符应正确拼写 @@ -97,6 +112,21 @@ 命名 + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hant.xlf b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hant.xlf index 9543551217..d503579ec8 100644 --- a/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hant.xlf +++ b/src/Text.Analyzers/Core/xlf/TextAnalyzersResources.zh-Hant.xlf @@ -2,6 +2,21 @@ + + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + + + + Flags enums should have plural names + Flags enums should have plural names + + + + Flags enums should have plural names + Flags enums should have plural names + + Identifiers should be spelled correctly 識別項的拼字應正確 @@ -97,6 +112,21 @@ 命名 + + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + + + Only FlagsAttribute enums should have plural names + Only FlagsAttribute enums should have plural names + + \ No newline at end of file diff --git a/src/Text.Analyzers/Directory.Build.props b/src/Text.Analyzers/Directory.Build.props new file mode 100644 index 0000000000..a02192beaa --- /dev/null +++ b/src/Text.Analyzers/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + + $(DefineConstants),TEXT_ANALYZERS + + diff --git a/src/Microsoft.CodeQuality.Analyzers/RulesMissingDocumentation.md b/src/Text.Analyzers/RulesMissingDocumentation.md similarity index 100% rename from src/Microsoft.CodeQuality.Analyzers/RulesMissingDocumentation.md rename to src/Text.Analyzers/RulesMissingDocumentation.md diff --git a/src/Text.Analyzers/Text.Analyzers.md b/src/Text.Analyzers/Text.Analyzers.md index e69de29bb2..a3e9cd4e7e 100644 --- a/src/Text.Analyzers/Text.Analyzers.md +++ b/src/Text.Analyzers/Text.Analyzers.md @@ -0,0 +1,25 @@ +# Text.Analyzers + +## [CA1714](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714): Flags enums should have plural names + +A public enumeration has the System.FlagsAttribute attribute, and its name does not end in ""s"". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified. + +|Item|Value| +|-|-| +|Category|Naming| +|Enabled|False| +|Severity|Warning| +|CodeFix|False| +--- + +## [CA1717](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717): Only FlagsAttribute enums should have plural names + +Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time. + +|Item|Value| +|-|-| +|Category|Naming| +|Enabled|False| +|Severity|Warning| +|CodeFix|False| +--- diff --git a/src/Text.Analyzers/Text.Analyzers.sarif b/src/Text.Analyzers/Text.Analyzers.sarif new file mode 100644 index 0000000000..bf20881dd5 --- /dev/null +++ b/src/Text.Analyzers/Text.Analyzers.sarif @@ -0,0 +1,84 @@ +{ + "$schema": "http://json.schemastore.org/sarif-1.0.0", + "version": "1.0.0", + "runs": [ + { + "tool": { + "name": "Humanizer", + "version": "3.3.3", + "language": "en-US" + }, + "rules": { + } + }, + { + "tool": { + "name": "Text.Analyzers", + "version": "3.3.3", + "language": "en-US" + }, + "rules": { + "CA1714": { + "id": "CA1714", + "shortDescription": "Flags enums should have plural names", + "fullDescription": "A public enumeration has the System.FlagsAttribute attribute, and its name does not end in \"\"s\"\". Types that are marked by using FlagsAttribute have names that are plural because the attribute indicates that more than one value can be specified.", + "defaultLevel": "warning", + "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1714", + "properties": { + "category": "Naming", + "isEnabledByDefault": false, + "typeName": "EnumsShouldHavePluralNamesAnalyzer", + "languages": [ + "C#", + "Visual Basic" + ], + "tags": [ + "PortedFromFxCop", + "Telemetry", + "EnabledRuleInAggressiveMode" + ] + } + }, + "CA1717": { + "id": "CA1717", + "shortDescription": "Only FlagsAttribute enums should have plural names", + "fullDescription": "Naming conventions dictate that a plural name for an enumeration indicates that more than one value of the enumeration can be specified at the same time.", + "defaultLevel": "warning", + "helpUri": "https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1717", + "properties": { + "category": "Naming", + "isEnabledByDefault": false, + "typeName": "EnumsShouldHavePluralNamesAnalyzer", + "languages": [ + "C#", + "Visual Basic" + ], + "tags": [ + "PortedFromFxCop", + "Telemetry", + "EnabledRuleInAggressiveMode" + ] + } + } + } + }, + { + "tool": { + "name": "Text.CSharp.Analyzers", + "version": "3.3.3", + "language": "en-US" + }, + "rules": { + } + }, + { + "tool": { + "name": "Text.VisualBasic.Analyzers", + "version": "3.3.3", + "language": "en-US" + }, + "rules": { + } + } + ] +} \ No newline at end of file diff --git a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNamesTests.cs b/src/Text.Analyzers/UnitTests/EnumsShouldHavePluralNamesTests.cs similarity index 98% rename from src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNamesTests.cs rename to src/Text.Analyzers/UnitTests/EnumsShouldHavePluralNamesTests.cs index 2f8d35278e..d7539f9781 100644 --- a/src/NetAnalyzers/UnitTests/Microsoft.CodeQuality.Analyzers/ApiDesignGuidelines/EnumsShouldHavePluralNamesTests.cs +++ b/src/Text.Analyzers/UnitTests/EnumsShouldHavePluralNamesTests.cs @@ -6,13 +6,13 @@ using Test.Utilities; using Xunit; using VerifyCS = Test.Utilities.CSharpCodeFixVerifier< - Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines.EnumsShouldHavePluralNamesAnalyzer, + Text.Analyzers.EnumsShouldHavePluralNamesAnalyzer, Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>; using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier< - Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines.EnumsShouldHavePluralNamesAnalyzer, + Text.Analyzers.EnumsShouldHavePluralNamesAnalyzer, Microsoft.CodeAnalysis.Testing.EmptyCodeFixProvider>; -namespace Microsoft.CodeQuality.Analyzers.ApiDesignGuidelines.UnitTests +namespace Text.Analyzers.UnitTests { public class EnumsShouldHavePluralNamesTests { diff --git a/src/Tools/GenerateAnalyzerNuspec/Program.cs b/src/Tools/GenerateAnalyzerNuspec/Program.cs index 9e844979be..891e0bec6c 100644 --- a/src/Tools/GenerateAnalyzerNuspec/Program.cs +++ b/src/Tools/GenerateAnalyzerNuspec/Program.cs @@ -19,15 +19,14 @@ var libraryList = args[10].Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); var rulesetsDir = args[11]; var editorconfigsDir = args[12]; -var legacyRulesets = args[13].Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); -var artifactsBinDir = args[14]; -var analyzerDocumentationFileDir = args[15]; -var analyzerDocumentationFileName = args[16]; -var analyzerSarifFileDir = args[17]; -var analyzerSarifFileName = args[18]; -var analyzerConfigurationFileDir = args[19]; -var analyzerConfigurationFileName = args[20]; -var globalAnalyzerConfigsDir = args[21]; +var artifactsBinDir = args[13]; +var analyzerDocumentationFileDir = args[14]; +var analyzerDocumentationFileName = args[15]; +var analyzerSarifFileDir = args[16]; +var analyzerSarifFileName = args[17]; +var analyzerConfigurationFileDir = args[18]; +var analyzerConfigurationFileName = args[19]; +var globalAnalyzerConfigsDir = args[20]; var result = new StringBuilder(); @@ -265,17 +264,6 @@ } } -if (legacyRulesets.Length > 0) -{ - foreach (string legacyRuleset in legacyRulesets) - { - if (Path.GetExtension(legacyRuleset) == ".ruleset") - { - result.AppendLine(FileElement(Path.Combine(projectDir, legacyRuleset), @"rulesets\legacy")); - } - } -} - result.AppendLine(FileElement(Path.Combine(assetsDir, "EULA.rtf"), "")); result.AppendLine(FileElement(Path.Combine(assetsDir, "ThirdPartyNotices.rtf"), "")); result.AppendLine(@" "); diff --git a/src/Tools/GenerateDocumentationAndConfigFiles/CommonPropertyNames.cs b/src/Tools/GenerateDocumentationAndConfigFiles/CommonPropertyNames.cs index 6e32611be9..8ffabbda99 100644 --- a/src/Tools/GenerateDocumentationAndConfigFiles/CommonPropertyNames.cs +++ b/src/Tools/GenerateDocumentationAndConfigFiles/CommonPropertyNames.cs @@ -8,10 +8,7 @@ public static class CommonPropertyNames public const string NetAnalyzersNugetAssemblyVersionPropertyName = "_NETAnalyzersNuGetAssemblyVersion"; public const string NetAnalyzersSDKAssemblyVersionPropertyName = "_NETAnalyzersSDKAssemblyVersion"; - public const string FxCopAnalyzersPackageName = "Microsoft.CodeAnalysis.FxCopAnalyzers"; - public const string NetCoreAnalyzersPackageName = "Microsoft.NetCore.Analyzers"; - public const string NetFrameworkAnalyzersPackageName = "Microsoft.NetFramework.Analyzers"; - public const string CodeQualityAnalyzersPackageName = "Microsoft.CodeQuality.Analyzers"; + public const string TextAnalyzersPackageName = "Text.Analyzers"; public const string CodeAnalysisAnalyzersPackageName = "Microsoft.CodeAnalysis.Analyzers"; public const string PublicApiAnalyzersPackageName = "Microsoft.CodeAnalysis.PublicApiAnalyzers"; diff --git a/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj b/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj index 0056792aec..e9da432224 100644 --- a/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj +++ b/src/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj @@ -8,8 +8,17 @@ $(MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion) + + + + + + + + + diff --git a/src/Tools/GenerateDocumentationAndConfigFiles/Program.cs b/src/Tools/GenerateDocumentationAndConfigFiles/Program.cs index 85d866ef38..b31b5e2f69 100644 --- a/src/Tools/GenerateDocumentationAndConfigFiles/Program.cs +++ b/src/Tools/GenerateDocumentationAndConfigFiles/Program.cs @@ -12,8 +12,12 @@ using System.Text; using System.Text.RegularExpressions; using Analyzer.Utilities; +using Analyzer.Utilities.PooledObjects; +using Analyzer.Utilities.PooledObjects.Extensions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.ReleaseTracking; +using Microsoft.CodeAnalysis.Text; using static GenerateDocumentationAndConfigFiles.CommonPropertyNames; namespace GenerateDocumentationAndConfigFiles @@ -22,7 +26,7 @@ public static class Program { public static int Main(string[] args) { - const int expectedArguments = 18; + const int expectedArguments = 22; const string validateOnlyPrefix = "-validateOnly:"; if (args.Length != expectedArguments) @@ -46,29 +50,38 @@ public static int Main(string[] args) string analyzerRulesetsDir = args[1]; string analyzerEditorconfigsDir = args[2]; - string binDirectory = args[3]; - string configuration = args[4]; - string tfm = args[5]; - var assemblyList = args[6].Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList(); - string propsFileDir = args[7]; - string propsFileName = args[8]; - string propsFileToDisableNetAnalyzersInNuGetPackageName = args[9]; - string analyzerDocumentationFileDir = args[10]; - string analyzerDocumentationFileName = args[11]; - string analyzerSarifFileDir = args[12]; - string analyzerSarifFileName = args[13]; - var analyzerVersion = args[14]; - var analyzerPackageName = args[15]; - if (!bool.TryParse(args[16], out var containsPortedFxCopRules)) + string analyzerGlobalconfigsDir = args[3]; + string binDirectory = args[4]; + string configuration = args[5]; + string tfm = args[6]; + var assemblyList = args[7].Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + string propsFileDir = args[8]; + string propsFileName = args[9]; + string targetsFileDir = args[10]; + string targetsFileName = args[11]; + string propsFileToDisableNetAnalyzersInNuGetPackageName = args[12]; + string analyzerDocumentationFileDir = args[13]; + string analyzerDocumentationFileName = args[14]; + string analyzerSarifFileDir = args[15]; + string analyzerSarifFileName = args[16]; + var analyzerVersion = args[17]; + var analyzerPackageName = args[18]; + if (!bool.TryParse(args[19], out var containsPortedFxCopRules)) { containsPortedFxCopRules = false; } - if (!bool.TryParse(args[17], out var generateAnalyzerRulesMissingDocumentationFile)) + if (!bool.TryParse(args[20], out var generateAnalyzerRulesMissingDocumentationFile)) { generateAnalyzerRulesMissingDocumentationFile = false; } + var releaseTrackingOptOutString = args[21]; + if (!bool.TryParse(releaseTrackingOptOutString, out bool releaseTrackingOptOut)) + { + releaseTrackingOptOut = false; + } + var allRulesById = new SortedList(); var fixableDiagnosticIds = new HashSet(); var categories = new HashSet(); @@ -184,6 +197,13 @@ public static int Main(string[] args) return 1; } + if (!createGlobalConfigFiles()) + { + return 2; + } + + CreateTargetsFile(targetsFileDir, targetsFileName, analyzerPackageName, categories.OrderBy(c => c)); + return 0; // Local functions. @@ -250,11 +270,7 @@ string getDisableNetAnalyzersImport() { if (!string.IsNullOrEmpty(propsFileToDisableNetAnalyzersInNuGetPackageName)) { - Debug.Assert(analyzerPackageName is NetAnalyzersPackageName or - FxCopAnalyzersPackageName or - NetCoreAnalyzersPackageName or - NetFrameworkAnalyzersPackageName or - CodeQualityAnalyzersPackageName); + Debug.Assert(analyzerPackageName is NetAnalyzersPackageName or TextAnalyzersPackageName); return $@" + {propertyStringForSettingDefaultPropertyValues} + + <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName}>$({analysisLevelSuffixPropName}) + <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName})' == ''"">$({analysisModePropName}) + <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName})' == 'AllEnabledByDefault'"">{nameof(AnalysisMode.All)} + <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName})' == 'AllDisabledByDefault'"">{nameof(AnalysisMode.None)} + <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName})' == ''"">{nameof(AnalysisMode.Default)} + + + <_GlobalAnalyzerConfigFileName_{trimmedPackageName} Condition=""'$({packageVersionPropName})' != ''"">{analysisLevelPropName}_$({packageVersionPropName}.Replace(""."",""_""))_$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName}).editorconfig + + <_GlobalAnalyzerConfigDir_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigDir_{trimmedPackageName})' == ''"">$(MSBuildThisFileDirectory)config + <_GlobalAnalyzerConfigFile_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigFileName_{trimmedPackageName})' != ''"">$(_GlobalAnalyzerConfigDir_{trimmedPackageName})\$(_GlobalAnalyzerConfigFileName_{trimmedPackageName}) + + + + + + +"; + + static string GetPropertyStringForSettingDefaultPropertyValues( + string packageName, + string packageVersionPropName, + string? category, + string analysisLevelPropName, + string analysisLevelPrefixPropName, + string analysisLevelSuffixPropName, + string effectiveAnalysisLevelPropName) + { + if (packageName == NetAnalyzersPackageName) + { + var propertyStr = string.Empty; + + if (!string.IsNullOrEmpty(category)) + { + // For category-specific logic, we need to duplicate logic from SDK targets to set + // category-specific AnalysisLevel property values. In future, we should consider removing similar logic from + // SDK targets for core AnalysisLevel and instead generalize this logic. + + propertyStr += $@" + + <{analysisLevelPropName} Condition=""'$({analysisLevelPropName})' == ''"">$(AnalysisLevel) + + + <{analysisLevelPrefixPropName} Condition=""$({analysisLevelPropName}.Contains('-'))"">$([System.Text.RegularExpressions.Regex]::Replace($({analysisLevelPropName}), '-(.)*', '')) + <{analysisLevelSuffixPropName} Condition=""'$({analysisLevelPrefixPropName})' != ''"">$([System.Text.RegularExpressions.Regex]::Replace($({analysisLevelPropName}), '$({analysisLevelPrefixPropName})-', '')) + + + + <{effectiveAnalysisLevelPropName} Condition=""'$({analysisLevelPropName})' == 'none' or '$({analysisLevelPrefixPropName})' == 'none'"">4.0 + <{effectiveAnalysisLevelPropName} Condition=""'$({analysisLevelPropName})' == 'latest' or '$({analysisLevelPrefixPropName})' == 'latest'"">5.0 + <{effectiveAnalysisLevelPropName} Condition=""'$({analysisLevelPropName})' == 'preview' or '$({analysisLevelPrefixPropName})' == 'preview'"">6.0 + + + <{effectiveAnalysisLevelPropName} Condition=""'$({effectiveAnalysisLevelPropName})' == '' And + '$({analysisLevelPrefixPropName})' != ''"">$({analysisLevelPrefixPropName}) + <{effectiveAnalysisLevelPropName} Condition=""'$({effectiveAnalysisLevelPropName})' == '' And + '$({analysisLevelPropName})' != ''"">$({analysisLevelPropName}) +"; + } + + propertyStr += $@" + + <{packageVersionPropName} Condition=""'$({packageVersionPropName})' == '' and $({effectiveAnalysisLevelPropName}) != ''"">$([System.Text.RegularExpressions.Regex]::Replace($({effectiveAnalysisLevelPropName}), '(.0)*$', '')) +"; + return propertyStr; + } + + return string.Empty; + } + } + + static string GetMSBuildContentForPropertyAndItemOptions() + { + var builder = new StringBuilder(); + + AddMSBuildContentForPropertyOptions(builder); + AddMSBuildContentForItemOptions(builder); + + return builder.ToString(); + + static void AddMSBuildContentForPropertyOptions(StringBuilder builder) + { + var compilerVisibleProperties = new List(); + foreach (var field in typeof(MSBuildPropertyOptionNames).GetFields()) + { + compilerVisibleProperties.Add(field.Name); + } + + // Add ItemGroup for MSBuild property names that are required to be threaded as analyzer config options. + AddItemGroupForCompilerVisibleProperties(compilerVisibleProperties, builder); + } + + static void AddItemGroupForCompilerVisibleProperties(List compilerVisibleProperties, StringBuilder builder) + { + builder.AppendLine($@" + + "); + foreach (var compilerVisibleProperty in compilerVisibleProperties) + { + builder.AppendLine($@" "); + } + + builder.AppendLine($@" "); + } + + static void AddMSBuildContentForItemOptions(StringBuilder builder) + { + // Add ItemGroup and PropertyGroup for MSBuild item names that are required to be treated as analyzer config options. + // The analyzer config option will have the following key/value: + // - Key: Item name prefixed with an '_' and suffixed with a 'List' to reduce chances of conflicts with any existing project property. + // - Value: Concatenated item metadata values, separated by a ',' character. See https://github.com/dotnet/sdk/issues/12706#issuecomment-668219422 for details. + + builder.Append($@" + + +"); + var compilerVisibleProperties = new List(); + foreach (var field in typeof(MSBuildItemOptionNames).GetFields()) + { + // Item option name: "SupportedPlatform" + // Generated MSBuild property: "<_SupportedPlatformList>@(SupportedPlatform, '')" + + var itemOptionName = field.Name; + var propertyName = MSBuildItemOptionNamesHelpers.GetPropertyNameForItemOptionName(itemOptionName); + compilerVisibleProperties.Add(propertyName); + builder.AppendLine($@" <{propertyName}>@({itemOptionName}, '{MSBuildItemOptionNamesHelpers.ValuesSeparator}')"); + } + + builder.AppendLine($@" "); + + AddItemGroupForCompilerVisibleProperties(compilerVisibleProperties, builder); + } + } + + static string GetCodeAnalysisTreatWarningsAsErrorsTargetContents() + { + return $@" + + + + $(WarningsNotAsErrors);$(CodeAnalysisRuleIds) + + +"; + } + + static string GetPackageSpecificContents(string packageName) + { + switch (packageName) + { + case CodeAnalysisAnalyzersPackageName: + return @" + + + + + + + + + + + + + + + "; + + case PublicApiAnalyzersPackageName: + return @" + + + + + + + + "; + + case PerformanceSensitiveAnalyzersPackageName: + return @" + + true + $(MSBuildThisFileDirectory)PerformanceSensitiveAttribute$(DefaultLanguageSourceExtension) + + + + + + + + "; + + case NetAnalyzersPackageName: + return $@" + + + + "; + + default: + return string.Empty; + } + } + } + private enum RulesetKind { AllDefault, @@ -905,6 +1574,16 @@ private enum RulesetKind AllDisabled, } + // NOTE: **Do not** change the names of the fields for this enum - that would be a breaking change for user visible property setting for `AnalysisMode` property in MSBuild project file. + private enum AnalysisMode + { + Default, + None, + Minimum, + Recommended, + All + } + private sealed class AnalyzerAssemblyLoader : IAnalyzerAssemblyLoader { public static IAnalyzerAssemblyLoader Instance = new AnalyzerAssemblyLoader(); diff --git a/src/Tools/GenerateGlobalAnalyzerConfigs/GenerateGlobalAnalyzerConfigs.csproj b/src/Tools/GenerateGlobalAnalyzerConfigs/GenerateGlobalAnalyzerConfigs.csproj deleted file mode 100644 index c76df9dfd0..0000000000 --- a/src/Tools/GenerateGlobalAnalyzerConfigs/GenerateGlobalAnalyzerConfigs.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - Exe - netcoreapp3.1 - true - true - false - $(MicrosoftCodeAnalysisForRoslynDiagnosticsAnalyzersVersion) - - - - - - - - - - - - - - - - - - diff --git a/src/Tools/GenerateGlobalAnalyzerConfigs/Program.cs b/src/Tools/GenerateGlobalAnalyzerConfigs/Program.cs deleted file mode 100644 index 5f239aba9a..0000000000 --- a/src/Tools/GenerateGlobalAnalyzerConfigs/Program.cs +++ /dev/null @@ -1,582 +0,0 @@ -// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using Analyzer.Utilities; -using Analyzer.Utilities.PooledObjects; -using Analyzer.Utilities.PooledObjects.Extensions; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.Diagnostics; -using Microsoft.CodeAnalysis.ReleaseTracking; -using Microsoft.CodeAnalysis.Text; -using static GenerateDocumentationAndConfigFiles.CommonPropertyNames; - -namespace GenerateGlobalAnalyzerConfigs -{ - public static class Program - { - public static int Main(string[] args) - { - const int expectedArguments = 9; - - if (args.Length != expectedArguments) - { - Console.Error.WriteLine($"Expected {expectedArguments} arguments, found {args.Length}: {string.Join(';', args)}"); - return 1; - } - - var outputDir = args[0]; - var packageName = args[1]; - string targetsFileDir = args[2]; - string targetsFileName = args[3]; - var assemblyList = args[4].Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList(); - var binDirectory = args[5]; - var configuration = args[6]; - var tfm = args[7]; - var releaseTrackingOptOutString = args[8]; - - if (!bool.TryParse(releaseTrackingOptOutString, out bool releaseTrackingOptOut)) - { - releaseTrackingOptOut = false; - } - - using var shippedFilesDataBuilder = ArrayBuilder.GetInstance(); - using var versionsBuilder = PooledHashSet.GetInstance(); - - // Validate all assemblies exist on disk and can be loaded. - foreach (string assembly in assemblyList) - { - var assemblyPath = GetAssemblyPath(assembly); - if (!File.Exists(assemblyPath)) - { - Console.Error.WriteLine($"'{assemblyPath}' does not exist"); - return 2; - } - - try - { - _ = Assembly.LoadFrom(assemblyPath); - } -#pragma warning disable CA1031 // Do not catch general exception types - catch (Exception ex) -#pragma warning restore CA1031 // Do not catch general exception types - { - Console.Error.WriteLine(ex.Message); - return 3; - } - } - - // Compute descriptors by rule ID and shipped analyzer release versions and shipped data. - var allRulesById = new SortedList(); - var sawShippedFile = false; - foreach (string assembly in assemblyList) - { - var assemblyPath = GetAssemblyPath(assembly); - var analyzerFileReference = new AnalyzerFileReference(assemblyPath, AnalyzerAssemblyLoader.Instance); - analyzerFileReference.AnalyzerLoadFailed += AnalyzerFileReference_AnalyzerLoadFailed; - var analyzers = analyzerFileReference.GetAnalyzersForAllLanguages(); - - foreach (var analyzer in analyzers) - { - foreach (var rule in analyzer.SupportedDiagnostics) - { - allRulesById[rule.Id] = rule; - } - } - - var assemblyDir = Path.GetDirectoryName(assemblyPath); - if (assemblyDir is null) - { - continue; - } - var assemblyName = Path.GetFileNameWithoutExtension(assembly); - var shippedFile = Path.Combine(assemblyDir, "AnalyzerReleases", assemblyName, ReleaseTrackingHelper.ShippedFileName); - if (File.Exists(shippedFile)) - { - sawShippedFile = true; - - if (releaseTrackingOptOut) - { - Console.Error.WriteLine($"'{shippedFile}' exists but was not expected"); - return 4; - } - - try - { - using var fileStream = File.OpenRead(shippedFile); - var sourceText = SourceText.From(fileStream); - var releaseTrackingData = ReleaseTrackingHelper.ReadReleaseTrackingData(shippedFile, sourceText, - onDuplicateEntryInRelease: (_1, _2, _3, _4, line) => throw new Exception($"Duplicate entry in {shippedFile} at {line.LineNumber}: '{line}'"), - onInvalidEntry: (line, _2, _3, _4) => throw new Exception($"Invalid entry in {shippedFile} at {line.LineNumber}: '{line}'"), - isShippedFile: true); - shippedFilesDataBuilder.Add(releaseTrackingData); - versionsBuilder.AddRange(releaseTrackingData.Versions); - } -#pragma warning disable CA1031 // Do not catch general exception types - catch (Exception ex) -#pragma warning restore CA1031 // Do not catch general exception types - { - Console.Error.WriteLine(ex.Message); - return 5; - } - } - } - - if (!releaseTrackingOptOut && !sawShippedFile) - { - Console.Error.WriteLine($"Could not find any 'AnalyzerReleases.Shipped.md' file"); - return 6; - } - - if (versionsBuilder.Count > 0) - { - var shippedFilesData = shippedFilesDataBuilder.ToImmutable(); - - // Generate global analyzer config files for each shipped version, if required. - foreach (var version in versionsBuilder) - { - var analysisLevelVersionString = GetNormalizedVersionStringForEditorconfigFileNameSuffix(version); - - foreach (var analysisMode in Enum.GetValues(typeof(AnalysisMode))) - { - CreateEditorconfig( - outputDir, - $"AnalysisLevel_{analysisLevelVersionString}_{analysisMode}.editorconfig", - $"Rules from '{version}' release with '{analysisMode}' analysis mode", - $"Rules with enabled-by-default state from '{version}' release with '{analysisMode}' analysis mode. Rules that are first released in a version later than '{version}' are disabled.", - (AnalysisMode)analysisMode!, - allRulesById, - (shippedFilesData, version)); - } - } - } - - CreateTargetsFile(targetsFileDir, targetsFileName, packageName); - - return 0; - - // Local functions. - static string GetNormalizedVersionStringForEditorconfigFileNameSuffix(Version version) - { - var fieldCount = GetVersionFieldCount(version); - return version.ToString(fieldCount).Replace(".", "_", StringComparison.Ordinal); - - static int GetVersionFieldCount(Version version) - { - if (version.Revision > 0) - { - return 4; - } - - if (version.Build > 0) - { - return 3; - } - - if (version.Minor > 0) - { - return 2; - } - - return 1; - } - } - - static void AnalyzerFileReference_AnalyzerLoadFailed(object? sender, AnalyzerLoadFailureEventArgs e) - => throw e.Exception ?? new InvalidOperationException(e.Message); - - string GetAssemblyPath(string assembly) - { - var assemblyName = Path.GetFileNameWithoutExtension(assembly); - var assemblyDir = Path.Combine(binDirectory, assemblyName, configuration, tfm); - return Path.Combine(assemblyDir, assembly); - } - } - - private static void CreateEditorconfig( - string folder, - string editorconfigFileName, - string editorconfigTitle, - string editorconfigDescription, - AnalysisMode analysisMode, - SortedList sortedRulesById, - (ImmutableArray shippedFiles, Version version) shippedReleaseData) - { - Debug.Assert(editorconfigFileName.EndsWith(".editorconfig", StringComparison.Ordinal)); - - var text = GetEditorconfigText( - editorconfigTitle, - editorconfigDescription, - analysisMode, - sortedRulesById, - shippedReleaseData); - var directory = Directory.CreateDirectory(folder); - var editorconfigFilePath = Path.Combine(directory.FullName, editorconfigFileName); - File.WriteAllText(editorconfigFilePath, text); - return; - - // Local functions - static string GetEditorconfigText( - string editorconfigTitle, - string editorconfigDescription, - AnalysisMode analysisMode, - SortedList sortedRulesById, - (ImmutableArray shippedFiles, Version version)? shippedReleaseData) - { - var result = new StringBuilder(); - StartEditorconfig(); - AddRules(analysisMode); - return result.ToString(); - - void StartEditorconfig() - { - result.AppendLine(@"# NOTE: Requires **VS2019 16.7** or later"); - result.AppendLine(); - result.AppendLine($@"# {editorconfigTitle}"); - result.AppendLine($@"# Description: {editorconfigDescription}"); - result.AppendLine(); - result.AppendLine($@"is_global = true"); - result.AppendLine(); - } - - bool AddRules(AnalysisMode analysisMode) - { - Debug.Assert(sortedRulesById.Count > 0); - - var addedRule = false; - foreach (var rule in sortedRulesById) - { - if (AddRule(rule.Value)) - { - addedRule = true; - } - } - - return addedRule; - - bool AddRule(DiagnosticDescriptor rule) - { - var (isEnabledByDefault, severity) = GetEnabledByDefaultAndSeverity(rule, analysisMode); - if (rule.IsEnabledByDefault == isEnabledByDefault && - severity == rule.DefaultSeverity) - { - // Rule had the same default severity and enabled state in the release. - // We do not need to generate any entry. - return false; - } - - string severityString = GetRuleSeverity(isEnabledByDefault, severity); - - result.AppendLine(); - result.AppendLine($"# {rule.Id}: {rule.Title}"); - result.AppendLine($@"dotnet_diagnostic.{rule.Id}.severity = {severityString}"); - return true; - } - - (bool isEnabledByDefault, DiagnosticSeverity effectiveSeverity) GetEnabledByDefaultAndSeverity(DiagnosticDescriptor rule, AnalysisMode analysisMode) - { - if (analysisMode == AnalysisMode.AllDisabledByDefault) - { - return (isEnabledByDefault: false, DiagnosticSeverity.Warning); - } - - var isEnabledByDefault = rule.IsEnabledByDefault; - var effectiveSeverity = rule.DefaultSeverity; - - var isEnabledRuleInAggressiveMode = analysisMode == AnalysisMode.AllEnabledByDefault && - rule.CustomTags.Contains(WellKnownDiagnosticTagsExtensions.EnabledRuleInAggressiveMode); - if (isEnabledRuleInAggressiveMode) - { - isEnabledByDefault = true; - effectiveSeverity = DiagnosticSeverity.Warning; - } - - if (shippedReleaseData != null) - { - isEnabledByDefault = isEnabledRuleInAggressiveMode; - var maxVersion = shippedReleaseData.Value.version; - foreach (var shippedFile in shippedReleaseData.Value.shippedFiles) - { - if (shippedFile.TryGetLatestReleaseTrackingLine(rule.Id, maxVersion, out _, out var releaseTrackingLine) && - releaseTrackingLine.EnabledByDefault.HasValue && - releaseTrackingLine.DefaultSeverity.HasValue) - { - isEnabledByDefault = releaseTrackingLine.EnabledByDefault.Value && !releaseTrackingLine.IsRemovedRule; - effectiveSeverity = releaseTrackingLine.DefaultSeverity.Value; - - if (isEnabledRuleInAggressiveMode && !releaseTrackingLine.IsRemovedRule) - { - isEnabledByDefault = true; - effectiveSeverity = DiagnosticSeverity.Warning; - } - - break; - } - } - } - - return (isEnabledByDefault, effectiveSeverity); - } - - static string GetRuleSeverity(bool isEnabledByDefault, DiagnosticSeverity defaultSeverity) - { - if (isEnabledByDefault) - { - return GetSeverityString(defaultSeverity); - } - else - { - return GetSeverityString(null); - } - - static string GetSeverityString(DiagnosticSeverity? severity) - { - if (!severity.HasValue) - { - return "none"; - } - - return severity.Value switch - { - DiagnosticSeverity.Error => "error", - DiagnosticSeverity.Warning => "warning", - DiagnosticSeverity.Info => "suggestion", - DiagnosticSeverity.Hidden => "silent", - _ => throw new NotImplementedException(severity.Value.ToString()), - }; - } - } - } - } - } - - private static void CreateTargetsFile(string targetsFileDir, string targetsFileName, string packageName) - { - if (string.IsNullOrEmpty(targetsFileDir) || string.IsNullOrEmpty(targetsFileName)) - { - return; - } - - var fileContents = -$@"{GetCommonContents(packageName)}{GetPackageSpecificContents(packageName)} -"; - var directory = Directory.CreateDirectory(targetsFileDir); - var fileWithPath = Path.Combine(directory.FullName, targetsFileName); - File.WriteAllText(fileWithPath, fileContents); - - static string GetCommonContents(string packageName) - => GetGlobalAnalyzerConfigTargetContents(packageName) + GetMSBuildContentForPropertyAndItemOptions() + GetCodeAnalysisTreatWarningsAsErrorsTargetContents(); - - static string GetGlobalAnalyzerConfigTargetContents(string packageName) - { - var trimmedPackageName = packageName.Replace(".", string.Empty, StringComparison.Ordinal); - var packageVersionPropName = trimmedPackageName + "RulesVersion"; - var propertyStringForSettingDefaultPropertyValue = GetPropertyStringForSettingDefaultPropertyValue(packageName, packageVersionPropName); - - return $@" - - - {propertyStringForSettingDefaultPropertyValue} - - <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName}>$(AnalysisMode) - <_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName})' == ''"">{nameof(AnalysisMode.Default)} - - - <_GlobalAnalyzerConfigFileName_{trimmedPackageName} Condition=""'$({packageVersionPropName})' != ''"">AnalysisLevel_$({packageVersionPropName}.Replace(""."",""_""))_$(_GlobalAnalyzerConfigAnalysisMode_{trimmedPackageName}).editorconfig - - <_GlobalAnalyzerConfigDir_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigDir_{trimmedPackageName})' == ''"">$(MSBuildThisFileDirectory)config - <_GlobalAnalyzerConfigFile_{trimmedPackageName} Condition=""'$(_GlobalAnalyzerConfigFileName_{trimmedPackageName})' != ''"">$(_GlobalAnalyzerConfigDir_{trimmedPackageName})\$(_GlobalAnalyzerConfigFileName_{trimmedPackageName}) - - - - - - -"; - - static string GetPropertyStringForSettingDefaultPropertyValue(string packageName, string packageVersionPropName) - { - if (packageName == NetAnalyzersPackageName) - { - return $@" - - <{packageVersionPropName} Condition=""'$({packageVersionPropName})' == '' and $(EffectiveAnalysisLevel) != ''"">$([System.Text.RegularExpressions.Regex]::Replace($(EffectiveAnalysisLevel), '(.0)*$', '')) -"; - } - - return string.Empty; - } - } - - static string GetMSBuildContentForPropertyAndItemOptions() - { - var builder = new StringBuilder(); - - AddMSBuildContentForPropertyOptions(builder); - AddMSBuildContentForItemOptions(builder); - - return builder.ToString(); - - static void AddMSBuildContentForPropertyOptions(StringBuilder builder) - { - var compilerVisibleProperties = new List(); - foreach (var field in typeof(MSBuildPropertyOptionNames).GetFields()) - { - compilerVisibleProperties.Add(field.Name); - } - - // Add ItemGroup for MSBuild property names that are required to be threaded as analyzer config options. - AddItemGroupForCompilerVisibleProperties(compilerVisibleProperties, builder); - } - - static void AddItemGroupForCompilerVisibleProperties(List compilerVisibleProperties, StringBuilder builder) - { - builder.AppendLine($@" - - "); - foreach (var compilerVisibleProperty in compilerVisibleProperties) - { - builder.AppendLine($@" "); - } - - builder.AppendLine($@" "); - } - - static void AddMSBuildContentForItemOptions(StringBuilder builder) - { - // Add ItemGroup and PropertyGroup for MSBuild item names that are required to be treated as analyzer config options. - // The analyzer config option will have the following key/value: - // - Key: Item name prefixed with an '_' and suffixed with a 'List' to reduce chances of conflicts with any existing project property. - // - Value: Concatenated item metadata values, separated by a ',' character. See https://github.com/dotnet/sdk/issues/12706#issuecomment-668219422 for details. - - builder.Append($@" - - -"); - var compilerVisibleProperties = new List(); - foreach (var field in typeof(MSBuildItemOptionNames).GetFields()) - { - // Item option name: "SupportedPlatform" - // Generated MSBuild property: "<_SupportedPlatformList>@(SupportedPlatform, '')" - - var itemOptionName = field.Name; - var propertyName = MSBuildItemOptionNamesHelpers.GetPropertyNameForItemOptionName(itemOptionName); - compilerVisibleProperties.Add(propertyName); - builder.AppendLine($@" <{propertyName}>@({itemOptionName}, '{MSBuildItemOptionNamesHelpers.ValuesSeparator}')"); - } - - builder.AppendLine($@" "); - - AddItemGroupForCompilerVisibleProperties(compilerVisibleProperties, builder); - } - } - - static string GetCodeAnalysisTreatWarningsAsErrorsTargetContents() - { - return $@" - - - - $(WarningsNotAsErrors);$(CodeAnalysisRuleIds) - - -"; - } - - static string GetPackageSpecificContents(string packageName) - { - switch (packageName) - { - case CodeAnalysisAnalyzersPackageName: - return @" - - - - - - - - - - - - - - - "; - - case PublicApiAnalyzersPackageName: - return @" - - - - - - - - "; - - case PerformanceSensitiveAnalyzersPackageName: - return @" - - true - $(MSBuildThisFileDirectory)PerformanceSensitiveAttribute$(DefaultLanguageSourceExtension) - - - - - - - - "; - - case NetAnalyzersPackageName: - return $@" - - - - "; - - default: - return string.Empty; - } - } - } - - private sealed class AnalyzerAssemblyLoader : IAnalyzerAssemblyLoader - { - public static IAnalyzerAssemblyLoader Instance = new AnalyzerAssemblyLoader(); - - private AnalyzerAssemblyLoader() { } - public void AddDependencyLocation(string fullPath) - { - } - - public Assembly LoadFromPath(string fullPath) - { - return Assembly.LoadFrom(fullPath); - } - } - - // NOTE: **Do not** change the names of the fields for this enum - that would be a breaking change for user visible property setting for `AnalysisMode` property in MSBuild project file. - private enum AnalysisMode - { - Default, - AllDisabledByDefault, - AllEnabledByDefault, - } - } -} diff --git a/src/Tools/ReleaseNotesUtil/GenDiffNotes.cmd b/src/Tools/ReleaseNotesUtil/GenDiffNotes.cmd index 6609186b2f..25bdb5bf65 100644 --- a/src/Tools/ReleaseNotesUtil/GenDiffNotes.cmd +++ b/src/Tools/ReleaseNotesUtil/GenDiffNotes.cmd @@ -1,5 +1,5 @@ @echo off -REM GenDiffNotes.cmd scratchDir nugetSource fxCopAnalyzersOldVersion fxCopAnalyzersNewVersion +REM GenDiffNotes.cmd scratchDir nugetSource netAnalyzersOldVersion netAnalyzersNewVersion REM Ex: GenDiffNotes.cmd C:\scratch nuget.org 2.6.3 2.9.0 if [%1]==[] goto usage @@ -17,8 +17,8 @@ set DIFFNOTES=%SCRATCHDIR%\%OLDVERSION%_%NEWVERSION%-notes.md @echo on mkdir %SCRATCHDIR% pushd %SCRATCHDIR% -nuget.exe install -source %NUGETSOURCE% Microsoft.CodeAnalysis.FxCopAnalyzers -version %OLDVERSION% -nuget.exe install -source %NUGETSOURCE% Microsoft.CodeAnalysis.FxCopAnalyzers -version %NEWVERSION% +nuget.exe install -source %NUGETSOURCE% Microsoft.CodeAnalysis.NetAnalyzers -version %OLDVERSION% +nuget.exe install -source %NUGETSOURCE% Microsoft.CodeAnalysis.NetAnalyzers -version %NEWVERSION% popd dotnet.exe ReleaseNotesUtil.dll getrulesjson %SCRATCHDIR% %OLDVERSION% %SCRATCHDIR%\%OLDVERSION%-rules.json dotnet.exe ReleaseNotesUtil.dll getrulesjson %SCRATCHDIR% %NEWVERSION% %SCRATCHDIR%\%NEWVERSION%-rules.json @@ -37,5 +37,5 @@ if exist "%DIFFNOTES%" ( goto :eof :usage -echo Usage: %0 scratchDir nugetSource fxCopAnalyzersOldVersion fxCopAnalyzersNewVersion -echo Example: %0 C:\scratch nuget.org 2.6.3 2.9.0 \ No newline at end of file +echo Usage: %0 scratchDir nugetSource netAnalyzersOldVersion netAnalyzersNewVersion +echo Example: %0 C:\scratch nuget.org 5.0.0 6.0.0 \ No newline at end of file diff --git a/src/Tools/ReleaseNotesUtil/Program.cs b/src/Tools/ReleaseNotesUtil/Program.cs index 9a8fb8f660..2bc87749ea 100644 --- a/src/Tools/ReleaseNotesUtil/Program.cs +++ b/src/Tools/ReleaseNotesUtil/Program.cs @@ -43,13 +43,13 @@ public static void Main(string[] args) private static void PrintUsage() { Console.WriteLine("Usage: ReleaseNoteUtil command commandArgs ..."); - Console.WriteLine(" getrulesjson pathToNugetInstalledPackages fxCopAnalyzersVersion out.json"); + Console.WriteLine(" getrulesjson pathToNugetInstalledPackages netAnalyzersVersion out.json"); Console.WriteLine(" diffrules old.json new.json out.md"); } private static void GetRulesJson(string nugetInstalledPackagesPath, string version, string outputPath) { - IEnumerable dllPaths = GetFxCopAnalyzerBinaries(nugetInstalledPackagesPath, version); + IEnumerable dllPaths = GetNetAnalyzerBinaries(nugetInstalledPackagesPath, version); RuleFileContent ruleFileContent = new RuleFileContent { Rules = GetRules(dllPaths) @@ -163,7 +163,7 @@ private static void GenerateChangedRulesDiffMarkdown(StringBuilder sb, string he } } - private static IEnumerable GetFxCopAnalyzerBinaries(string nugetInstalledPackagesPath, string version) + private static IEnumerable GetNetAnalyzerBinaries(string nugetInstalledPackagesPath, string version) { if (!Directory.Exists(nugetInstalledPackagesPath)) { diff --git a/src/Utilities.UnitTests/Options/SymbolNamesWithValueOptionTests.cs b/src/Utilities.UnitTests/Options/SymbolNamesWithValueOptionTests.cs index fef2efc14e..f135f4fb8e 100644 --- a/src/Utilities.UnitTests/Options/SymbolNamesWithValueOptionTests.cs +++ b/src/Utilities.UnitTests/Options/SymbolNamesWithValueOptionTests.cs @@ -19,7 +19,7 @@ public sealed class SymbolNamesWithValueOptionTests public void WhenNoSymbolNames_ReturnsEmpty() { // Arrange & act - var options = SymbolNamesWithValueOption.Create(ImmutableArray.Empty, GetCompilation(), null, null); + var options = SymbolNamesWithValueOption.Create(ImmutableArray.Empty, GetCompilation(), null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Equal(SymbolNamesWithValueOption.Empty, options); @@ -37,7 +37,7 @@ SymbolNamesWithValueOption.NameParts func(string symbolName) { callCount++; } - return new SymbolNamesWithValueOption.NameParts(symbolName); + return new SymbolNamesWithValueOption.NameParts(symbolName, Unit.Default); } // Act @@ -56,7 +56,7 @@ public void UnqualifiedSymbolNamesAreProcessedAsNames() var symbolNames = ImmutableArray.Create("MyNamespace", "MyClass", "MyMethod()", "MyProperty", "MyEvent", "MyField"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Equal(symbolNames.Length, options.GetTestAccessor().Names.Count); @@ -90,7 +90,7 @@ public void MyMethod() {} "MyNamespace.MyClass.MyMethod()"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -124,7 +124,7 @@ public void MyMethod() {} "M:MyNamespace.MyClass.MyMethod()"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -146,7 +146,7 @@ public void UnfoundQualifiedSymbolNamesWithPrefixAreExcluded() "M:MyNamespace.MyClass.MyMethod()"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -166,7 +166,7 @@ public void UnsupportedWildcardConstructionsAreIgnored() "*a*"); // more than one wildcard symbol // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -188,7 +188,7 @@ public void WildcardConstructionsWithoutPrefixAreCorrectlyClassified() "MyNamespace.MyClass.MyMethod(*"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -217,7 +217,7 @@ public void WildcardConstructionsWithPrefixAreCorrectlyClassified() "M:MyNamespace.MyClass.MyMethod(*"); // Act - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Assert Assert.Empty(options.GetTestAccessor().Names); @@ -361,7 +361,7 @@ public void MyMethod2(string s) {} }"); var symbolNames = ImmutableArray.Create(patternName); var symbol = FindSymbol(compilation, symbolName); - var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, null); + var options = SymbolNamesWithValueOption.Create(symbolNames, compilation, null, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default)); // Act var isFound = options.Contains(symbol); diff --git a/src/Utilities/Compiler/Analyzer.Utilities.projitems b/src/Utilities/Compiler/Analyzer.Utilities.projitems index 96c24627a6..8baccd466f 100644 --- a/src/Utilities/Compiler/Analyzer.Utilities.projitems +++ b/src/Utilities/Compiler/Analyzer.Utilities.projitems @@ -11,6 +11,9 @@ $(DefineConstants),CODEANALYSIS_V3_OR_BETTER + + $(DefineConstants),CODEANALYSIS_V3_7_OR_BETTER + $(DefineConstants);HAS_IOPERATION true diff --git a/src/Utilities/Compiler/DiagnosticDescriptorHelper.cs b/src/Utilities/Compiler/DiagnosticDescriptorHelper.cs index c36bf26fc7..4786100c96 100644 --- a/src/Utilities/Compiler/DiagnosticDescriptorHelper.cs +++ b/src/Utilities/Compiler/DiagnosticDescriptorHelper.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET_ANALYZERS || FXCOP_ANALYZERS +#if NET_ANALYZERS || TEXT_ANALYZERS using System.Diagnostics; using System.Linq; @@ -20,7 +20,6 @@ public static DiagnosticDescriptor Create( LocalizableString? description, bool isPortedFxCopRule, bool isDataflowRule, - bool isEnabledByDefaultInFxCopAnalyzers = true, bool isEnabledByDefaultInAggressiveMode = true, bool isReportedAtCompilationEnd = false, params string[] additionalCustomTags) @@ -31,7 +30,7 @@ public static DiagnosticDescriptor Create( // Ensure 'isEnabledByDefaultInAggressiveMode' is not false for enabled rules in default mode Debug.Assert(isEnabledByDefaultInAggressiveMode || ruleLevel == RuleLevel.Disabled || ruleLevel == RuleLevel.CandidateForRemoval); - var (defaultSeverity, enabledByDefault) = GetDefaultSeverityAndEnabledByDefault(ruleLevel, isEnabledByDefaultInFxCopAnalyzers); + var (defaultSeverity, enabledByDefault) = GetDefaultSeverityAndEnabledByDefault(ruleLevel); #pragma warning disable CA1308 // Normalize strings to uppercase - use lower case ID in help link var helpLink = $"https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/{id.ToLowerInvariant()}"; @@ -52,15 +51,8 @@ public static DiagnosticDescriptor Create( return new DiagnosticDescriptor(id, title, messageFormat, category, defaultSeverity, enabledByDefault, description, helpLink, customTags); #pragma warning restore RS0030 -#pragma warning disable CA1801 // Remove unused parameter - parameters used conditionally - static (DiagnosticSeverity defaultSeverity, bool enabledByDefault) GetDefaultSeverityAndEnabledByDefault( - RuleLevel ruleLevel, - bool isEnabledByDefaultInFxCopAnalyzers) -#pragma warning restore CA1801 // Remove unused parameter + static (DiagnosticSeverity defaultSeverity, bool enabledByDefault) GetDefaultSeverityAndEnabledByDefault(RuleLevel ruleLevel) { -#if FXCOP_ANALYZERS - return (DiagnosticSeverity.Warning, isEnabledByDefaultInFxCopAnalyzers); -#else return ruleLevel switch { RuleLevel.BuildWarning => (DiagnosticSeverity.Warning, true), @@ -70,7 +62,6 @@ public static DiagnosticDescriptor Create( RuleLevel.CandidateForRemoval => (DiagnosticSeverity.Warning, false), _ => throw new System.NotImplementedException(), }; -#endif } static string[] GetDefaultCustomTags( diff --git a/src/Utilities/Compiler/Extensions/KeyValuePairExtensions.cs b/src/Utilities/Compiler/Extensions/KeyValuePairExtensions.cs index 8a12bbc649..3be321ae0a 100644 --- a/src/Utilities/Compiler/Extensions/KeyValuePairExtensions.cs +++ b/src/Utilities/Compiler/Extensions/KeyValuePairExtensions.cs @@ -11,5 +11,11 @@ public static void Deconstruct(this KeyValuePair pai key = pair.Key; value = pair.Value; } + + public static KeyValuePair AsNullable(this KeyValuePair pair) + { + // This conversion is safe + return pair!; + } } } diff --git a/src/Utilities/Compiler/Options/AbstractCategorizedAnalyzerConfigOptions.cs b/src/Utilities/Compiler/Options/AbstractCategorizedAnalyzerConfigOptions.cs index 59ee29729b..894f0d9a6e 100644 --- a/src/Utilities/Compiler/Options/AbstractCategorizedAnalyzerConfigOptions.cs +++ b/src/Utilities/Compiler/Options/AbstractCategorizedAnalyzerConfigOptions.cs @@ -25,8 +25,7 @@ protected AbstractCategorizedAnalyzerConfigOptions() public abstract bool IsEmpty { get; } protected abstract bool TryGetOptionValue(string optionKeyPrefix, string? optionKeySuffix, string optionName, [NotNullWhen(returnValue: true)] out string? valueString); - [return: MaybeNull, NotNullIfNotNull("defaultValue")] - public T/*??*/ GetOptionValue(string optionName, SyntaxTree tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, [MaybeNull] T/*??*/ defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) + public T GetOptionValue(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) { if (TryGetOptionValue(optionName, kind, rule, tryParseValue, defaultValue, out var value)) { @@ -62,7 +61,7 @@ protected static bool HasSupportedKeyPrefix(string key, [NotNullWhen(returnValue return false; } - public bool TryGetOptionValue(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue tryParseValue, [MaybeNull] T/*??*/ defaultValue, [MaybeNullWhen(false), NotNullIfNotNull("defaultValue")] out T value) + public bool TryGetOptionValue(string optionName, OptionKind kind, DiagnosticDescriptor? rule, TryParseValue tryParseValue, T defaultValue, out T value) { if (this.IsEmpty) { @@ -93,7 +92,7 @@ public bool TryGetOptionValue(string optionName, OptionKind kind, DiagnosticD { var optionKeyPrefix = MapOptionKindToKeyPrefix(kind); - T optionValue; + T? optionValue; if (rule != null) { if (TryGetSpecificOptionValue(rule.Id, optionKeyPrefix, out optionValue) || diff --git a/src/Utilities/Compiler/Options/AggregateCategorizedAnalyzerConfigOptions.cs b/src/Utilities/Compiler/Options/AggregateCategorizedAnalyzerConfigOptions.cs index 1584b5fab5..bfdf477de8 100644 --- a/src/Utilities/Compiler/Options/AggregateCategorizedAnalyzerConfigOptions.cs +++ b/src/Utilities/Compiler/Options/AggregateCategorizedAnalyzerConfigOptions.cs @@ -27,14 +27,17 @@ namespace Analyzer.Utilities internal sealed class AggregateCategorizedAnalyzerConfigOptions : ICategorizedAnalyzerConfigOptions { public static readonly AggregateCategorizedAnalyzerConfigOptions Empty = new AggregateCategorizedAnalyzerConfigOptions( + globalOptions: null, ImmutableDictionary>.Empty, CompilationCategorizedAnalyzerConfigOptions.Empty); + private readonly Lazy? _globalOptions; private readonly ImmutableDictionary> _perTreeOptions; private readonly CompilationCategorizedAnalyzerConfigOptions _additionalFileBasedOptions; - private AggregateCategorizedAnalyzerConfigOptions(ImmutableDictionary> perTreeOptions, CompilationCategorizedAnalyzerConfigOptions additionalFileBasedOptions) + private AggregateCategorizedAnalyzerConfigOptions(Lazy? globalOptions, ImmutableDictionary> perTreeOptions, CompilationCategorizedAnalyzerConfigOptions additionalFileBasedOptions) { + _globalOptions = globalOptions; _perTreeOptions = perTreeOptions; _additionalFileBasedOptions = additionalFileBasedOptions; } @@ -58,13 +61,20 @@ public static AggregateCategorizedAnalyzerConfigOptions Create(AnalyzerConfigOpt return Empty; } + Lazy? globalOptions; +#if CODEANALYSIS_V3_7_OR_BETTER + globalOptions = new Lazy(() => SyntaxTreeCategorizedAnalyzerConfigOptions.Create(analyzerConfigOptionsProvider.GlobalOptions)); +#else + globalOptions = null; +#endif + var perTreeOptionsBuilder = PooledDictionary>.GetInstance(); foreach (var tree in compilation.SyntaxTrees) { perTreeOptionsBuilder.Add(tree, new Lazy(() => Create(tree, analyzerConfigOptionsProvider))); } - return new AggregateCategorizedAnalyzerConfigOptions(perTreeOptionsBuilder.ToImmutableDictionaryAndFree(), additionalFileBasedOptions); + return new AggregateCategorizedAnalyzerConfigOptions(globalOptions, perTreeOptionsBuilder.ToImmutableDictionaryAndFree(), additionalFileBasedOptions); static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider) { @@ -73,8 +83,7 @@ static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, Analyz } } - [return: MaybeNull, NotNullIfNotNull("defaultValue")] - public T/*??*/ GetOptionValue(string optionName, SyntaxTree tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, [MaybeNull] T/*??*/ defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) + public T GetOptionValue(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality) { if (TryGetOptionValue(optionName, kind, tree, rule, tryParseValue, defaultValue, out var value)) { @@ -84,7 +93,7 @@ static SyntaxTreeCategorizedAnalyzerConfigOptions Create(SyntaxTree tree, Analyz return defaultValue; } - private bool TryGetOptionValue(string optionName, OptionKind kind, SyntaxTree tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, [MaybeNull] T/*??*/ defaultValue, [MaybeNullWhen(false), NotNullIfNotNull("defaultValue")] out T value) + private bool TryGetOptionValue(string optionName, OptionKind kind, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, T defaultValue, [MaybeNullWhen(false)] out T value) { if (ReferenceEquals(this, Empty)) { @@ -98,6 +107,17 @@ private bool TryGetOptionValue(string optionName, OptionKind kind, SyntaxTree return true; } + if (tree is null) + { + if (_globalOptions is null) + { + value = defaultValue; + return false; + } + + return _globalOptions.Value.TryGetOptionValue(optionName, kind, rule, tryParseValue, defaultValue, out value); + } + return _perTreeOptions.TryGetValue(tree, out var lazyTreeOptions) && lazyTreeOptions.Value.TryGetOptionValue(optionName, kind, rule, tryParseValue, defaultValue, out value); } diff --git a/src/Utilities/Compiler/Options/AnalyzerOptionsExtensions.cs b/src/Utilities/Compiler/Options/AnalyzerOptionsExtensions.cs index bb9709f329..0469e9c454 100644 --- a/src/Utilities/Compiler/Options/AnalyzerOptionsExtensions.cs +++ b/src/Utilities/Compiler/Options/AnalyzerOptionsExtensions.cs @@ -1,7 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#nullable disable warnings - using System; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -267,7 +265,7 @@ public static SymbolNamesWithValueOption GetNullCheckValidationMethodsOpti SyntaxTree tree, Compilation compilation, CancellationToken cancellationToken) - => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.NullCheckValidationMethods, rule, tree, compilation, cancellationToken, namePrefix: "M:"); + => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.NullCheckValidationMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken, namePrefix: "M:"); public static SymbolNamesWithValueOption GetAdditionalStringFormattingMethodsOption( this AnalyzerOptions options, @@ -275,7 +273,7 @@ public static SymbolNamesWithValueOption GetAdditionalStringFormattingMeth SyntaxTree tree, Compilation compilation, CancellationToken cancellationToken) - => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalStringFormattingMethods, rule, tree, compilation, cancellationToken, namePrefix: "M:"); + => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalStringFormattingMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken, namePrefix: "M:"); public static bool IsConfiguredToSkipAnalysis( this AnalyzerOptions options, @@ -330,7 +328,7 @@ static SymbolNamesWithValueOption GetExcludedSymbolNamesWithValueOption( Compilation compilation, CancellationToken cancellationToken) => TryGetSyntaxTreeForOption(symbol, out var tree) - ? options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.ExcludedSymbolNames, rule, tree, compilation, cancellationToken) + ? options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.ExcludedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken) : SymbolNamesWithValueOption.Empty; static SymbolNamesWithValueOption GetExcludedTypeNamesWithDerivedTypesOption( @@ -340,7 +338,7 @@ static SymbolNamesWithValueOption GetExcludedTypeNamesWithDerivedTypesOpti Compilation compilation, CancellationToken cancellationToken) => TryGetSyntaxTreeForOption(symbol, out var tree) - ? options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.ExcludedTypeNamesWithDerivedTypes, rule, tree, compilation, cancellationToken, namePrefix: "T:") + ? options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.ExcludedTypeNamesWithDerivedTypes, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken, namePrefix: "T:") : SymbolNamesWithValueOption.Empty; } @@ -355,12 +353,12 @@ public static SymbolNamesWithValueOption GetDisallowedSymbolNamesWithValue public static SymbolNamesWithValueOption GetDisallowedSymbolNamesWithValueOption( this AnalyzerOptions options, DiagnosticDescriptor rule, - SyntaxTree tree, + SyntaxTree? tree, Compilation compilation, CancellationToken cancellationToken) - => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.DisallowedSymbolNames, rule, tree, compilation, cancellationToken); + => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.DisallowedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken); - public static SymbolNamesWithValueOption GetAdditionalRequiredSuffixesOption( + public static SymbolNamesWithValueOption GetAdditionalRequiredSuffixesOption( this AnalyzerOptions options, DiagnosticDescriptor rule, ISymbol symbol, @@ -368,23 +366,23 @@ public static SymbolNamesWithValueOption GetAdditionalRequiredSuffixesOp CancellationToken cancellationToken) => options.GetAdditionalRequiredSuffixesOption(rule, symbol.Locations[0].SourceTree, compilation, cancellationToken); - public static SymbolNamesWithValueOption GetAdditionalRequiredSuffixesOption( + public static SymbolNamesWithValueOption GetAdditionalRequiredSuffixesOption( this AnalyzerOptions options, DiagnosticDescriptor rule, - SyntaxTree tree, + SyntaxTree? tree, Compilation compilation, CancellationToken cancellationToken) { - return options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalRequiredSuffixes, rule, tree, compilation, cancellationToken, namePrefix: "T:", getTypeAndSuffixFunc: GetParts); + return options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalRequiredSuffixes, rule, tree, compilation, getTypeAndSuffixFunc: GetParts, cancellationToken, namePrefix: "T:"); - static SymbolNamesWithValueOption.NameParts GetParts(string name) + static SymbolNamesWithValueOption.NameParts GetParts(string name) { var split = name.Split(new[] { "->" }, StringSplitOptions.RemoveEmptyEntries); // If we don't find exactly one '->', we assume that there is no given suffix. if (split.Length != 2) { - return new SymbolNamesWithValueOption.NameParts(name); + return new SymbolNamesWithValueOption.NameParts(name, null); } // Note that we do not validate if the suffix will give a valid class name. @@ -399,19 +397,19 @@ static SymbolNamesWithValueOption.NameParts GetParts(string name) { if (trimmedSuffix[i] != ' ') { - return new SymbolNamesWithValueOption.NameParts(split[0], trimmedSuffix); + return new SymbolNamesWithValueOption.NameParts(split[0], trimmedSuffix); } } // Replace the special empty suffix symbol by an empty string - return new SymbolNamesWithValueOption.NameParts(split[0], string.Empty); + return new SymbolNamesWithValueOption.NameParts(split[0], string.Empty); } - return new SymbolNamesWithValueOption.NameParts(split[0], trimmedSuffix); + return new SymbolNamesWithValueOption.NameParts(split[0], trimmedSuffix); } } - public static SymbolNamesWithValueOption GetAdditionalRequiredGenericInterfaces( + public static SymbolNamesWithValueOption GetAdditionalRequiredGenericInterfaces( this AnalyzerOptions options, DiagnosticDescriptor rule, ISymbol symbol, @@ -419,23 +417,23 @@ public static SymbolNamesWithValueOption GetAdditionalRequired CancellationToken cancellationToken) => options.GetAdditionalRequiredGenericInterfaces(rule, symbol.Locations[0].SourceTree, compilation, cancellationToken); - public static SymbolNamesWithValueOption GetAdditionalRequiredGenericInterfaces( + public static SymbolNamesWithValueOption GetAdditionalRequiredGenericInterfaces( this AnalyzerOptions options, DiagnosticDescriptor rule, - SyntaxTree tree, + SyntaxTree? tree, Compilation compilation, CancellationToken cancellationToken) { - return options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalRequiredGenericInterfaces, rule, tree, compilation, cancellationToken, namePrefix: "T:", getTypeAndSuffixFunc: x => GetParts(x, compilation)); + return options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalRequiredGenericInterfaces, rule, tree, compilation, getTypeAndSuffixFunc: x => GetParts(x, compilation), cancellationToken, namePrefix: "T:"); - static SymbolNamesWithValueOption.NameParts GetParts(string name, Compilation compilation) + static SymbolNamesWithValueOption.NameParts GetParts(string name, Compilation compilation) { var split = name.Split(new[] { "->" }, StringSplitOptions.RemoveEmptyEntries); // If we don't find exactly one '->', we assume that there is no given suffix. if (split.Length != 2) { - return new SymbolNamesWithValueOption.NameParts(name); + return new SymbolNamesWithValueOption.NameParts(name, null); } var genericInterfaceFullName = split[1].Trim(); @@ -452,10 +450,10 @@ matchingSymbols[0] is not INamedTypeSymbol namedType || !namedType.IsGenericType) { // Invalid matching type so we assume there was no associated type - return new SymbolNamesWithValueOption.NameParts(split[0]); + return new SymbolNamesWithValueOption.NameParts(split[0], null); } - return new SymbolNamesWithValueOption.NameParts(split[0], namedType); + return new SymbolNamesWithValueOption.NameParts(split[0], namedType); } } @@ -466,7 +464,7 @@ public static SymbolNamesWithValueOption GetInheritanceExcludedSymbolNames Compilation compilation, string defaultForcedValue, CancellationToken cancellationToken) - => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalInheritanceExcludedSymbolNames, rule, tree, compilation, cancellationToken, optionForcedValue: defaultForcedValue); + => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalInheritanceExcludedSymbolNames, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken, optionForcedValue: defaultForcedValue); public static SymbolNamesWithValueOption GetAdditionalUseResultsMethodsOption( this AnalyzerOptions options, @@ -474,20 +472,19 @@ public static SymbolNamesWithValueOption GetAdditionalUseResultsMethodsOpt SyntaxTree tree, Compilation compilation, CancellationToken cancellationToken) - => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalUseResultsMethods, rule, tree, compilation, cancellationToken, namePrefix: "M:"); + => options.GetSymbolNamesWithValueOption(EditorConfigOptionNames.AdditionalUseResultsMethods, rule, tree, compilation, static name => new SymbolNamesWithValueOption.NameParts(name, Unit.Default), cancellationToken, namePrefix: "M:"); private static SymbolNamesWithValueOption GetSymbolNamesWithValueOption( this AnalyzerOptions options, string optionName, DiagnosticDescriptor rule, - SyntaxTree tree, + SyntaxTree? tree, Compilation compilation, + Func.NameParts> getTypeAndSuffixFunc, CancellationToken cancellationToken, string? namePrefix = null, string? optionDefaultValue = null, - string? optionForcedValue = null, - Func.NameParts>? getTypeAndSuffixFunc = null) - where TValue : notnull + string? optionForcedValue = null) { var analyzerConfigOptions = options.GetOrComputeCategorizedAnalyzerConfigOptions(compilation, cancellationToken); return analyzerConfigOptions.GetOptionValue(optionName, tree, rule, TryParse, defaultValue: GetDefaultValue()); @@ -671,6 +668,9 @@ CompilationCategorizedAnalyzerConfigOptions ComputeCategorizedAnalyzerConfigOpti if (fileName.Equals(".editorconfig", StringComparison.OrdinalIgnoreCase)) { var text = additionalFile.GetText(cancellationToken); + if (text is null) + return CompilationCategorizedAnalyzerConfigOptions.Empty; + return EditorConfigParser.Parse(text); } } diff --git a/src/Utilities/Compiler/Options/ICategorizedAnalyzerConfigOptions.cs b/src/Utilities/Compiler/Options/ICategorizedAnalyzerConfigOptions.cs index d9c04709b6..066a432a7e 100644 --- a/src/Utilities/Compiler/Options/ICategorizedAnalyzerConfigOptions.cs +++ b/src/Utilities/Compiler/Options/ICategorizedAnalyzerConfigOptions.cs @@ -46,8 +46,7 @@ internal interface ICategorizedAnalyzerConfigOptions { bool IsEmpty { get; } - [return: MaybeNull, NotNullIfNotNull("defaultValue")] - T/*??*/ GetOptionValue(string optionName, SyntaxTree tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, [MaybeNull] T/*??*/ defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); + T GetOptionValue(string optionName, SyntaxTree? tree, DiagnosticDescriptor? rule, TryParseValue tryParseValue, T defaultValue, OptionKind kind = OptionKind.DotnetCodeQuality); } internal static class CategorizedAnalyzerConfigOptionsExtensions diff --git a/src/Utilities/Compiler/Options/SymbolNamesWithValueOption.cs b/src/Utilities/Compiler/Options/SymbolNamesWithValueOption.cs index c92d46c2e0..a43bedb11d 100644 --- a/src/Utilities/Compiler/Options/SymbolNamesWithValueOption.cs +++ b/src/Utilities/Compiler/Options/SymbolNamesWithValueOption.cs @@ -14,13 +14,11 @@ namespace Analyzer.Utilities { internal sealed class SymbolNamesWithValueOption : IEquatable?> - where TValue : notnull { internal const SymbolKind AllKinds = SymbolKind.ErrorType; internal const char WildcardChar = '*'; public static readonly SymbolNamesWithValueOption Empty = new SymbolNamesWithValueOption(); - internal static KeyValuePair NoWildcardMatch => default; private readonly ImmutableDictionary _names; private readonly ImmutableDictionary _symbols; @@ -50,7 +48,7 @@ internal sealed class SymbolNamesWithValueOption : IEquatable /// Cache for the wildcard matching algorithm. The current implementation can be slow so we want to make sure that once a match is performed we save its result. /// - private readonly ConcurrentDictionary> _wildcardMatchResult = new ConcurrentDictionary>(); + private readonly ConcurrentDictionary> _wildcardMatchResult = new ConcurrentDictionary>(); private readonly ConcurrentDictionary _symbolToDeclarationId = new ConcurrentDictionary(); @@ -74,7 +72,7 @@ private SymbolNamesWithValueOption() #pragma warning disable CA1000 // Do not declare static members on generic types public static SymbolNamesWithValueOption Create(ImmutableArray symbolNames, Compilation compilation, string? optionalPrefix, #pragma warning restore CA1000 // Do not declare static members on generic types - Func? getSymbolNamePartsFunc = null) + Func getSymbolNamePartsFunc) { if (symbolNames.IsEmpty) { @@ -87,9 +85,7 @@ public static SymbolNamesWithValueOption Create(ImmutableArray s foreach (var symbolName in symbolNames) { - var parts = getSymbolNamePartsFunc != null - ? getSymbolNamePartsFunc(symbolName) - : new NameParts(symbolName); + var parts = getSymbolNamePartsFunc(symbolName); var numberOfWildcards = parts.SymbolName.Count(c => c == WildcardChar); @@ -219,7 +215,7 @@ static void ProcessSymbolName(NameParts parts, Compilation compilation, string? public bool IsEmpty => ReferenceEquals(this, Empty); public bool Contains(ISymbol symbol) - => _symbols.ContainsKey(symbol) || _names.ContainsKey(symbol.Name) || TryGetFirstWildcardMatch(symbol, out _); + => _symbols.ContainsKey(symbol) || _names.ContainsKey(symbol.Name) || TryGetFirstWildcardMatch(symbol, out _, out _); /// /// Gets the value associated with the specified symbol in the option specification. @@ -231,9 +227,8 @@ public bool TryGetValue(ISymbol symbol, [MaybeNullWhen(false)] out TValue value) return true; } - if (TryGetFirstWildcardMatch(symbol, out var match)) + if (TryGetFirstWildcardMatch(symbol, out _, out value)) { - value = match.Value; return true; } @@ -249,7 +244,7 @@ public bool Equals(SymbolNamesWithValueOption? other) public override int GetHashCode() => HashUtilities.Combine(HashUtilities.Combine(_names), HashUtilities.Combine(_symbols), HashUtilities.Combine(_wildcardNamesBySymbolKind)); - private bool TryGetFirstWildcardMatch(ISymbol symbol, out KeyValuePair firstMatch) + private bool TryGetFirstWildcardMatch(ISymbol symbol, [NotNullWhen(true)] out string? firstMatchName, [MaybeNullWhen(false)] out TValue firstMatchValue) { switch (symbol.Kind) { @@ -264,7 +259,8 @@ private bool TryGetFirstWildcardMatch(ISymbol symbol, out KeyValuePair GetDeclarationId(s)); // We start by trying to match with the most precise definition (prefix)... - if (_wildcardNamesBySymbolKind.ContainsKey(symbol.Kind)) + if (_wildcardNamesBySymbolKind.TryGetValue(symbol.Kind, out var names)) { - if (_wildcardNamesBySymbolKind[symbol.Kind].FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && + if (names.FirstOrDefault(kvp => symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var prefixedFirstMatchOrDefault && !string.IsNullOrWhiteSpace(prefixedFirstMatchOrDefault.Key)) { - firstMatch = prefixedFirstMatchOrDefault; - _wildcardMatchResult.AddOrUpdate(symbol, firstMatch, (s, match) => prefixedFirstMatchOrDefault); + (firstMatchName, firstMatchValue) = prefixedFirstMatchOrDefault; + _wildcardMatchResult.AddOrUpdate(symbol, prefixedFirstMatchOrDefault.AsNullable(), (s, match) => prefixedFirstMatchOrDefault.AsNullable()); return true; } } @@ -304,8 +303,8 @@ private bool TryGetFirstWildcardMatch(ISymbol symbol, out KeyValuePair symbolDeclarationId.StartsWith(kvp.Key, StringComparison.Ordinal)) is var unprefixedFirstMatchOrDefault && !string.IsNullOrWhiteSpace(unprefixedFirstMatchOrDefault.Key)) { - firstMatch = unprefixedFirstMatchOrDefault; - _wildcardMatchResult.AddOrUpdate(symbol, firstMatch, (s, match) => unprefixedFirstMatchOrDefault); + (firstMatchName, firstMatchValue) = unprefixedFirstMatchOrDefault; + _wildcardMatchResult.AddOrUpdate(symbol, unprefixedFirstMatchOrDefault.AsNullable(), (s, match) => unprefixedFirstMatchOrDefault.AsNullable()); return true; } @@ -314,14 +313,15 @@ private bool TryGetFirstWildcardMatch(ISymbol symbol, out KeyValuePair symbol.Name.StartsWith(kvp.Key, StringComparison.Ordinal)) is var partialFirstMatchOrDefault && !string.IsNullOrWhiteSpace(partialFirstMatchOrDefault.Key)) { - firstMatch = partialFirstMatchOrDefault; - _wildcardMatchResult.AddOrUpdate(symbol, firstMatch, (s, match) => partialFirstMatchOrDefault); + (firstMatchName, firstMatchValue) = partialFirstMatchOrDefault; + _wildcardMatchResult.AddOrUpdate(symbol, partialFirstMatchOrDefault.AsNullable(), (s, match) => partialFirstMatchOrDefault.AsNullable()); return true; } // Nothing was found - firstMatch = NoWildcardMatch; - _wildcardMatchResult.AddOrUpdate(symbol, firstMatch, (s, match) => NoWildcardMatch); + firstMatchName = null; + firstMatchValue = default; + _wildcardMatchResult.AddOrUpdate(symbol, new KeyValuePair(null, default), (s, match) => new KeyValuePair(null, default)); return false; static string GetDeclarationId(ISymbol symbol) @@ -358,7 +358,7 @@ internal TestAccessor(SymbolNamesWithValueOption symbolNamesWithValueOpt internal ref readonly ImmutableDictionary> WildcardNamesBySymbolKind => ref _symbolNamesWithValueOption._wildcardNamesBySymbolKind; - internal ref readonly ConcurrentDictionary> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; + internal ref readonly ConcurrentDictionary> WildcardMatchResult => ref _symbolNamesWithValueOption._wildcardMatchResult; internal ref readonly ConcurrentDictionary SymbolToDeclarationId => ref _symbolNamesWithValueOption._symbolToDeclarationId; } @@ -373,12 +373,10 @@ internal TestAccessor(SymbolNamesWithValueOption symbolNamesWithValueOpt /// public sealed class NameParts { - public NameParts(string symbolName, TValue associatedValue = default) + public NameParts(string symbolName, TValue associatedValue) { SymbolName = symbolName.Trim(); -#pragma warning disable CS8601 // Possible null reference assignment - https://github.com/dotnet/roslyn-analyzers/issues/4350 AssociatedValue = associatedValue; -#pragma warning restore CS8601 // Possible null reference assignment } public string SymbolName { get; } diff --git a/src/Utilities/Compiler/RuleLevel.cs b/src/Utilities/Compiler/RuleLevel.cs index 33941c5b4a..c2bf41e8c2 100644 --- a/src/Utilities/Compiler/RuleLevel.cs +++ b/src/Utilities/Compiler/RuleLevel.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -#if NET_ANALYZERS || FXCOP_ANALYZERS || MICROSOFT_CODEANALYSIS_ANALYZERS +#if NET_ANALYZERS || TEXT_ANALYZERS || MICROSOFT_CODEANALYSIS_ANALYZERS namespace Microsoft.CodeAnalysis { diff --git a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/DefaultPointsToValueGenerator.cs b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/DefaultPointsToValueGenerator.cs index 1dff703d03..d4167b5c68 100644 --- a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/DefaultPointsToValueGenerator.cs +++ b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/DefaultPointsToValueGenerator.cs @@ -31,7 +31,7 @@ public PointsToAbstractValue GetOrCreateDefaultValue(AnalysisEntity analysisEnti { return PointsToAbstractValue.Undefined; } - else if (!analysisEntity.Type.IsReferenceTypeOrNullableValueType()) + else if (analysisEntity.Type.IsNonNullableValueType()) { return PointsToAbstractValue.NoLocation; } diff --git a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/PointsToAnalysis.PointsToDataFlowOperationVisitor.cs b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/PointsToAnalysis.PointsToDataFlowOperationVisitor.cs index e8c6904ef2..1175eda4d3 100644 --- a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/PointsToAnalysis.PointsToDataFlowOperationVisitor.cs +++ b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/PointsToAnalysis.PointsToDataFlowOperationVisitor.cs @@ -4,7 +4,9 @@ using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics; +using Analyzer.Utilities; using Analyzer.Utilities.Extensions; +using Analyzer.Utilities.Lightup; using Analyzer.Utilities.PooledObjects; using Microsoft.CodeAnalysis.FlowAnalysis.DataFlow.CopyAnalysis; using Microsoft.CodeAnalysis.FlowAnalysis.DataFlow.ValueContentAnalysis; @@ -12,6 +14,8 @@ namespace Microsoft.CodeAnalysis.FlowAnalysis.DataFlow.PointsToAnalysis { + using NullableAnnotation = Analyzer.Utilities.Lightup.NullableAnnotation; + public partial class PointsToAnalysis : ForwardDataFlowAnalysis { /// @@ -914,7 +918,7 @@ public override PointsToAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocal var value = VisitInvocationCommon(originalOperation, visitedInstance); - if (IsSpecialEmptyOrFactoryMethod(method) && + if (IsSpecialMethodReturningNonNullValue(method, DataFlowAnalysisContext.WellKnownTypeProvider) && !TryGetInterproceduralAnalysisResult(originalOperation, out _)) { return value.MakeNonNull(); @@ -923,22 +927,38 @@ public override PointsToAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocal return value; } - private static bool IsSpecialEmptyOrFactoryMethod(IMethodSymbol method) - => IsSpecialFactoryMethod(method) || IsSpecialEmptyMember(method); + private static bool IsSpecialMethodReturningNonNullValue(IMethodSymbol method, WellKnownTypeProvider wellKnownTypeProvider) + => IsSpecialFactoryMethodReturningNonNullValue(method, wellKnownTypeProvider) || IsSpecialEmptyMember(method); /// /// Returns true if this special static factory method whose name starts with "Create", such that + /// method's return type is not nullable, i.e. 'type?', and /// method's containing type is static OR a special type OR derives from or is same as the type of the field/property/method return. /// For example: class SomeType { static SomeType CreateXXX(...); } /// - private static bool IsSpecialFactoryMethod(IMethodSymbol method) + private static bool IsSpecialFactoryMethodReturningNonNullValue(IMethodSymbol method, WellKnownTypeProvider wellKnownTypeProvider) { - return method.IsStatic && - method.Name.StartsWith("Create", StringComparison.Ordinal) && - (method.ContainingType.IsStatic || + if (!method.IsStatic || + !method.Name.StartsWith("Create", StringComparison.Ordinal) || + method.ReturnType.NullableAnnotation() == NullableAnnotation.Annotated) + { + return false; + } + + // 'Activator.CreateInstance' can return 'null'. + // Even though it is nullable annotated to return 'object?', + // the NullableAnnotation check above fails for VB, so we special case it here. + if (method.Name.Equals("CreateInstance", StringComparison.Ordinal) && + wellKnownTypeProvider.GetOrCreateTypeByMetadataName(WellKnownTypeNames.SystemActivator) is { } activatorType && + activatorType.Equals(method.ContainingType)) + { + return false; + } + + return method.ContainingType.IsStatic || method.ContainingType.SpecialType != SpecialType.None || method.ReturnType is INamedTypeSymbol namedType && - method.ContainingType.DerivesFromOrImplementsAnyConstructionOf(namedType.OriginalDefinition)); + method.ContainingType.DerivesFromOrImplementsAnyConstructionOf(namedType.OriginalDefinition); } /// diff --git a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/TaintedDataAnalysis.TaintedDataOperationVisitor.cs b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/TaintedDataAnalysis.TaintedDataOperationVisitor.cs index 6dbea977e8..21b4b47cc5 100644 --- a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/TaintedDataAnalysis.TaintedDataOperationVisitor.cs +++ b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/TaintedDataAnalysis.TaintedDataOperationVisitor.cs @@ -119,7 +119,27 @@ protected override TaintedDataAbstractValue GetDefaultValueForParameterOnEntry(I { if (this.DataFlowAnalysisContext.SourceInfos.IsSourceParameter(parameter, WellKnownTypeProvider)) { - return TaintedDataAbstractValue.CreateTainted(parameter, parameter.DeclaringSyntaxReferences[0].GetSyntax(), this.OwningSymbol); + // Location of the parameter, so we can track where the tainted data appears in code. + // The parameter itself may not have any DeclaringSyntaxReferences, e.g. 'value' inside property setters. + SyntaxNode parameterSyntaxNode; + if (!parameter.DeclaringSyntaxReferences.IsEmpty) + { + parameterSyntaxNode = parameter.DeclaringSyntaxReferences[0].GetSyntax(); + } + else if (!parameter.ContainingSymbol.DeclaringSyntaxReferences.IsEmpty) + { + parameterSyntaxNode = parameter.ContainingSymbol.DeclaringSyntaxReferences[0].GetSyntax(); + } + else + { + // Unless there are others, the only case we have for parameters being tainted data sources is inside + // ASP.NET Core MVC controller action methods (see WebInputSources.cs), so those parameters should + // always be declared somewhere. + Debug.Fail("Can we have a tainted data parameter with no syntax references?"); + return ValueDomain.UnknownOrMayBeValue; + } + + return TaintedDataAbstractValue.CreateTainted(parameter, parameterSyntaxNode, this.OwningSymbol); } return ValueDomain.UnknownOrMayBeValue; diff --git a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/WebInputSources.cs b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/WebInputSources.cs index 040623556f..2d54355fba 100644 --- a/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/WebInputSources.cs +++ b/src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/TaintedDataAnalysis/WebInputSources.cs @@ -89,6 +89,7 @@ static WebInputSources() if (methodSymbol.DeclaredAccessibility != Accessibility.Public || methodSymbol.IsConstructor() || methodSymbol.IsStatic + || methodSymbol.MethodKind != MethodKind.Ordinary || methodSymbol.HasDerivedMethodAttribute(wellKnownTypeProvider.GetOrCreateTypeByMetadataName(WellKnownTypeNames.MicrosoftAspNetCoreMvcNonActionAttribute))) { return false; diff --git a/tools/Snippets/EditorConfigExcludedSymbolNamesTest.snippet b/tools/Snippets/EditorConfigExcludedSymbolNamesTest.snippet index 16ee73b2fb..8d34f87dc4 100644 --- a/tools/Snippets/EditorConfigExcludedSymbolNamesTest.snippet +++ b/tools/Snippets/EditorConfigExcludedSymbolNamesTest.snippet @@ -3,7 +3,7 @@
EditorConfig ExcludedSymbolNames unit test - A unit test template for a Microsoft.CodeAnalysis.FxCopAnalyzers analyzer for excluding symbol names with EditorConfig. + A unit test template for a Microsoft.CodeAnalysis.NetAnalyzers analyzer for excluding symbol names with EditorConfig. edcfgtest