Skip to content

DetectedObjects msg type added

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jan 16, 2024 in 38s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

  • Declining Code Health: 8 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 reaction_analyzer_node.cpp
  • Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::printResults
  • Overall Code Complexity reaction_analyzer_node.cpp
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::printResults
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::initObservers
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::findFirstBrakeIdx
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::initEgoForTest
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::loadChainModules

Annotations

Check warning on line 176 in tools/reaction_analyzer/src/reaction_analyzer_node.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 4 functions with similar structure: ReactionAnalyzerNode::detectedObjectsOutputCallback,ReactionAnalyzerNode::predictedObjectsOutputCallback,ReactionAnalyzerNode::searchDetectedObjectsNearEntity,ReactionAnalyzerNode::searchPredictedObjectsNearEntity. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 471 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ReactionAnalyzerNode::printResults has a cyclomatic complexity of 16, 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 688 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ReactionAnalyzerNode::initObservers has a cyclomatic complexity of 11, 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 787 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ReactionAnalyzerNode::findFirstBrakeIdx 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 829 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ReactionAnalyzerNode::initEgoForTest has a cyclomatic complexity of 9, 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 522 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

ReactionAnalyzerNode::loadChainModules has a cyclomatic complexity of 9, 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 471 in tools/reaction_analyzer/src/reaction_analyzer_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

ReactionAnalyzerNode::printResults has 5 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 tools/reaction_analyzer/src/reaction_analyzer_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.50 across 26 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.