Skip to content

rename to perception_online_evaluator

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 27, 2024 in 37s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 27 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 0 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication metrics_calculator.cpp
  • Overall Code Complexity metrics_calculator.cpp
  • Overall Code Complexity perception_online_evaluator_node.cpp
  • Complex Method metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Complex Method objects_filtering.cpp: isTargetObjectType
  • Complex Method perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::onParameter
  • Complex Method perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::publishDebugMarker
  • Deep, Nested Complexity metrics_calculator.cpp: MetricsCalculator::getClosestStamp
  • Deep, Nested Complexity metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Missing Arguments Abstractions marker_utils.cpp
  • Primitive Obsession marker_utils.cpp
  • Complex Method objects_filtering.cpp: getDeviationCheckObjectTypes
  • Complex Method metrics_calculator.cpp: MetricsCalculator::averageFilterPath
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::calcPredictedPathDeviationMetrics
  • Bumpy Road Ahead perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::onTimer
  • Bumpy Road Ahead perception_online_evaluator_node.cpp: PerceptionOnlineEvaluatorNode::publishDebugMarker
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::hasPassedTime
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::getClosestStamp
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::deleteOldObjects
  • Bumpy Road Ahead metrics_calculator.cpp: MetricsCalculator::averageFilterPath
  • Excess Number of Function Arguments marker_utils.cpp: createPosesMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createFootprintMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createPointsMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createPointsMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createDeviationLines
  • Excess Number of Function Arguments marker_utils.cpp: createPoseMarkerArray
  • Excess Number of Function Arguments marker_utils.cpp: createObjectPolygonMarkerArray

Annotations

Check warning on line 179 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: MetricsCalculator::calcLateralDeviationMetrics,MetricsCalculator::calcYawDeviationMetrics. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

MetricsCalculator::calcPredictedPathDeviationMetrics has a cyclomatic complexity of 19, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 456 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

MetricsCalculator::averageFilterPath has a cyclomatic complexity of 10, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

MetricsCalculator::calcPredictedPathDeviationMetrics has 3 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 87 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

MetricsCalculator::hasPassedTime has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 123 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

MetricsCalculator::getClosestStamp has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 350 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

MetricsCalculator::deleteOldObjects has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 456 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

MetricsCalculator::averageFilterPath has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 1 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 5.12 across 17 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 123 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Deep, Nested Complexity

MetricsCalculator::getClosestStamp has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check warning on line 307 in evaluator/perception_online_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Deep, Nested Complexity

MetricsCalculator::calcPredictedPathDeviationMetrics has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

Check warning on line 281 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

PerceptionOnlineEvaluatorNode::onParameter has a cyclomatic complexity of 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 193 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

PerceptionOnlineEvaluatorNode::publishDebugMarker has a cyclomatic complexity of 12, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 99 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

PerceptionOnlineEvaluatorNode::onTimer has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 193 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Bumpy Road Ahead

PerceptionOnlineEvaluatorNode::publishDebugMarker has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 1 in evaluator/perception_online_evaluator/src/perception_online_evaluator_node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Overall Code Complexity

This module has a mean cyclomatic complexity of 4.33 across 9 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.

Check warning on line 1 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Missing Arguments Abstractions

The average number of function arguments in this module is 5.44 across 9 functions. The average arguments threshold is 4.00. The functions in this file have too many arguments, indicating a lack of encapsulation or too many responsibilities in the same functions. Avoid adding more.

Check warning on line 1 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Primitive Obsession

In this module, 65.3% of all function arguments are primitive types, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check warning on line 76 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createFootprintMarkerArray has 7 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 93 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createPointsMarkerArray has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 110 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createPointsMarkerArray has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 129 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createDeviationLines has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 144 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createPoseMarkerArray has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 161 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createPosesMarkerArray has 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check warning on line 194 in evaluator/perception_online_evaluator/src/utils/marker_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Excess Number of Function Arguments

createObjectPolygonMarkerArray has 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.