A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1509 below:

CA1509: Invalid entry in code metrics configuration file (code analysis) - .NET

CA1509: Invalid entry in code metrics configuration file

In this article Property Value Rule ID CA1509 Title Invalid entry in code metrics configuration file Category Maintainability Fix is breaking or non-breaking Non-Breaking Enabled by default in .NET 9 No Cause

A configuration file named CodeMetricsConfig.txt has an invalid entry.

Rule description

The analysis rules for code metrics allow you to supply an additional file in your project named CodeMetricsConfig.txt. This file contains entries to configure code-metric thresholds for analysis. The following rules are configurable in this file:

This configuration file expects each entry to be in following format:

'RuleId'(Optional 'SymbolKind'): 'Threshold'

For example, the following is a valid configuration file:

# Comment text

CA1501: 1

CA1502(Type): 4
CA1502(Method): 2

An invalid entry in this configuration file is flagged with the CA1509 diagnostic.

How to fix violations

To fix a violation of this rule, make sure the invalid entry in CodeMetricsConfig.txt gets the required format.

When to suppress warnings

Do not suppress violations of this rule.

See also

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.

Additional resources

In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4