All rules
CA1509Maintainability Enabled by default: No
Invalid entry in code metrics configuration file
Invalid entry in code metrics configuration file
Microsoft docsDescription
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:
- CA1501: Avoid excessive inheritance
- CA1502: Avoid excessive complexity
- CA1505: Avoid unmaintainable code
- CA1506: Avoid excessive class coupling
This configuration file expects each entry to be in following format:
- Valid values for
RuleIdareCA1501,CA1502,CA1505, andCA1506. - Valid values for the optional
SymbolKindareAssembly,Namespace,Type,Method,Field,Event, andProperty. - Valid values for
Thresholdare non-negative integers. - Lines starting with '#' are treated as comment lines.
For example, the following is a valid configuration file:
An invalid entry in this configuration file is flagged with the CA1509 diagnostic.
Cause
A configuration file named *CodeMetricsConfig.txt* has an invalid entry.
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
Do not suppress violations of this rule.
Your vote
Group results
0 yes 0 no
ConsensusNone (disabled)
Severity preference (yes voters)
Suggestion0
Warning0
Error0