Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port FxCop Code Metrics rules #1740

Merged
merged 3 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
-Microsoft.Design#CA1064;
-Microsoft.Design#CA1065;

-Microsoft.Maintainability#CA1501;
-Microsoft.Maintainability#CA1502;
-Microsoft.Maintainability#CA1505;
-Microsoft.Maintainability#CA1506;

-Microsoft.Naming#CA1707;
-Microsoft.Naming#CA1708;
-Microsoft.Naming#CA1710;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,54 @@
<data name="UseNameOfInPlaceOfStringTitle" xml:space="preserve">
<value>Use nameof to express symbol names</value>
</data>
<data name="AvoidExcessiveClassCouplingDescription" xml:space="preserve">
<value>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.</value>
</data>
<data name="AvoidExcessiveClassCouplingMessage" xml:space="preserve">
<value>'{0}' is coupled with '{1}' different types from '{2}' different namespaces. Rewrite or refactor the code to decrease its class coupling below '{3}'.</value>
</data>
<data name="AvoidExcessiveClassCouplingTitle" xml:space="preserve">
<value>Avoid excessive class coupling</value>
</data>
<data name="AvoidExcessiveComplexityDescription" xml:space="preserve">
<value>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.</value>
</data>
<data name="AvoidExcessiveComplexityMessage" xml:space="preserve">
<value>'{0}' has a cyclomatic complexity of '{1}'. Rewrite or refactor the code to decrease its complexity below '{2}'.</value>
</data>
<data name="AvoidExcessiveComplexityTitle" xml:space="preserve">
<value>Avoid excessive complexity</value>
</data>
<data name="AvoidExcessiveInheritanceDescription" xml:space="preserve">
<value>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.</value>
</data>
<data name="AvoidExcessiveInheritanceMessage" xml:space="preserve">
<value>'{0}' has an object hierarchy '{1}' levels deep within the defining module. If possible, eliminate base classes within the hierarchy to decrease its hierarchy level below '{2}': '{3}'</value>
</data>
<data name="AvoidExcessiveInheritanceTitle" xml:space="preserve">
<value>Avoid excessive inheritance</value>
</data>
<data name="AvoidUnmantainableCodeDescription" xml:space="preserve">
<value>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.</value>
</data>
<data name="AvoidUnmantainableCodeMessage" xml:space="preserve">
<value>'{0}' has a maintainability index of '{1}'. Rewrite or refactor the code to increase its maintainability index (MI) above '{2}'.</value>
</data>
<data name="AvoidUnmantainableCodeTitle" xml:space="preserve">
<value>Avoid unmaintainable code</value>
</data>
<data name="InvalidEntryInCodeMetricsConfigFileDescription" xml:space="preserve">
<value>Invalid entry in code metrics rule specification file</value>
</data>
<data name="InvalidEntryInCodeMetricsConfigFileMessage" xml:space="preserve">
<value>Invalid entry '{0}' in code metrics rule specification file '{1}'</value>
</data>
<data name="InvalidEntryInCodeMetricsConfigFileTitle" xml:space="preserve">
<value>Invalid entry in code metrics rule specification file</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,91 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../MicrosoftMaintainabilityAnalyzersResources.resx">
<body>
<trans-unit id="AvoidExcessiveClassCouplingDescription">
<source>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.</source>
<target state="new">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.</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveClassCouplingMessage">
<source>'{0}' is coupled with '{1}' different types from '{2}' different namespaces. Rewrite or refactor the code to decrease its class coupling below '{3}'.</source>
<target state="new">'{0}' is coupled with '{1}' different types from '{2}' different namespaces. Rewrite or refactor the code to decrease its class coupling below '{3}'.</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveClassCouplingTitle">
<source>Avoid excessive class coupling</source>
<target state="new">Avoid excessive class coupling</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveComplexityDescription">
<source>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.</source>
<target state="new">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.</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveComplexityMessage">
<source>'{0}' has a cyclomatic complexity of '{1}'. Rewrite or refactor the code to decrease its complexity below '{2}'.</source>
<target state="new">'{0}' has a cyclomatic complexity of '{1}'. Rewrite or refactor the code to decrease its complexity below '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveComplexityTitle">
<source>Avoid excessive complexity</source>
<target state="new">Avoid excessive complexity</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveInheritanceDescription">
<source>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.</source>
<target state="new">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.</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveInheritanceMessage">
<source>'{0}' has an object hierarchy '{1}' levels deep within the defining module. If possible, eliminate base classes within the hierarchy to decrease its hierarchy level below '{2}': '{3}'</source>
<target state="new">'{0}' has an object hierarchy '{1}' levels deep within the defining module. If possible, eliminate base classes within the hierarchy to decrease its hierarchy level below '{2}': '{3}'</target>
<note />
</trans-unit>
<trans-unit id="AvoidExcessiveInheritanceTitle">
<source>Avoid excessive inheritance</source>
<target state="new">Avoid excessive inheritance</target>
<note />
</trans-unit>
<trans-unit id="AvoidUnmantainableCodeDescription">
<source>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.</source>
<target state="new">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.</target>
<note />
</trans-unit>
<trans-unit id="AvoidUnmantainableCodeMessage">
<source>'{0}' has a maintainability index of '{1}'. Rewrite or refactor the code to increase its maintainability index (MI) above '{2}'.</source>
<target state="new">'{0}' has a maintainability index of '{1}'. Rewrite or refactor the code to increase its maintainability index (MI) above '{2}'.</target>
<note />
</trans-unit>
<trans-unit id="AvoidUnmantainableCodeTitle">
<source>Avoid unmaintainable code</source>
<target state="new">Avoid unmaintainable code</target>
<note />
</trans-unit>
<trans-unit id="InvalidEntryInCodeMetricsConfigFileDescription">
<source>Invalid entry in code metrics rule specification file</source>
<target state="new">Invalid entry in code metrics rule specification file</target>
<note />
</trans-unit>
<trans-unit id="InvalidEntryInCodeMetricsConfigFileMessage">
<source>Invalid entry '{0}' in code metrics rule specification file '{1}'</source>
<target state="new">Invalid entry '{0}' in code metrics rule specification file '{1}'</target>
<note />
</trans-unit>
<trans-unit id="InvalidEntryInCodeMetricsConfigFileTitle">
<source>Invalid entry in code metrics rule specification file</source>
<target state="new">Invalid entry in code metrics rule specification file</target>
<note />
</trans-unit>
<trans-unit id="VariableNamesShouldNotMatchFieldNamesTitle">
<source>Variable names should not match field names</source>
<target state="translated">Názvy proměnných se nemají shodovat s názvy polí.</target>
Expand Down
Loading