src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.EventMetricData.cs (6)
34long linesOfCode = MetricsHelper.GetLinesOfCode(declarations, @event, context);
36MetricsHelper.ComputeCoupledTypesAndComplexityExcludingMemberDecls(declarations, @event, coupledTypesBuilder, context);
37MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, @event.Type);
43MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, child.CoupledNamedTypes);
50int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
51MetricsHelper.RemoveContainingTypes(@event, coupledTypesBuilder);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.MethodMetricData.cs (6)
33long linesOfCode = MetricsHelper.GetLinesOfCode(declarations, method, context);
35MetricsHelper.ComputeCoupledTypesAndComplexityExcludingMemberDecls(declarations, method, coupledTypesBuilder, context);
36MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, method.Parameters);
39MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, method.ReturnType);
44MetricsHelper.RemoveContainingTypes(method, coupledTypesBuilder);
60return MetricsHelper.NormalizeAndRoundMaintainabilityIndex(171 - 5.2 * computationalComplexityVolume - 0.23 * cyclomaticComplexity - 16.2 * logEffectiveLinesOfCode);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.PropertyMetricData.cs (7)
34long linesOfCode = MetricsHelper.GetLinesOfCode(declarations, property, context);
36MetricsHelper.ComputeCoupledTypesAndComplexityExcludingMemberDecls(declarations, property, coupledTypesBuilder, context);
37MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, property.Parameters);
38MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, property.Type);
44MetricsHelper.AddCoupledNamedTypes(coupledTypesBuilder, context.WellKnownTypeProvider, child.CoupledNamedTypes);
51int maintainabilityIndex = !children.IsEmpty ? MetricsHelper.GetAverageRoundedMetricValue(maintainabilityIndexTotal, children.Length) : 100;
52MetricsHelper.RemoveContainingTypes(property, coupledTypesBuilder);