CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 34 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):
- Complex Method topic_publisher.cpp: TopicPublisher::initRosbagPublishers
- Code Duplication subscriber.cpp
- Bumpy Road Ahead topic_publisher.cpp: TopicPublisher::initRosbagPublishers
- Complex Method subscriber.cpp: SubscriberBase::initReactionChainsAndParams
- Complex Method subscriber.cpp: SubscriberBase::initSubscribers
- Complex Method subscriber.cpp: SubscriberBase::getMessageBuffersMap
- Complex Conditional reaction_analyzer_node.cpp: ReactionAnalyzerNode::initEgoForTest
- Overall Code Complexity reaction_analyzer_node.cpp
- Overall Code Complexity subscriber.cpp
- Deep, Nested Complexity topic_publisher.cpp: TopicPublisher::initRosbagPublishers
- Bumpy Road Ahead subscriber.cpp: SubscriberBase::getMessageBuffersMap
- Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::calculateResults
- Complex Method subscriber.cpp: SubscriberBase::findFirstBrakeIdx
- Large Method reaction_analyzer_node.cpp: Node
- Complex Method subscriber.cpp: SubscriberBase::controlCommandOutputCallback
- Complex Method topic_publisher.cpp: TopicPublisher::pointcloudMessagesSyncPublisher
- Deep, Nested Complexity subscriber.cpp: SubscriberBase::controlCommandOutputCallback
- Primitive Obsession subscriber.cpp
- Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::initEgoForTest
- Deep, Nested Complexity subscriber.cpp: SubscriberBase::findFirstBrakeIdx
- Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::initEgoForTest
- Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::calculateResults
- Bumpy Road Ahead subscriber.cpp: SubscriberBase::initReactionChainsAndParams
- Bumpy Road Ahead subscriber.cpp: SubscriberBase::findFirstBrakeIdx
- Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::spawnObstacle
- Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::writeResultsToFile
- Complex Conditional subscriber.cpp: SubscriberBase::trajectoryOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::trajectoryOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::predictedObjectsOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::predictedObjectsOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::detectedObjectsOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::detectedObjectsOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::trackedObjectsOutputCallback
- Complex Conditional subscriber.cpp: SubscriberBase::trackedObjectsOutputCallback
Annotations
Check warning on line 488 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
ReactionAnalyzerNode::initEgoForTest 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 305 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
ReactionAnalyzerNode::calculateResults has a cyclomatic complexity of 14, 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 609 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
ReactionAnalyzerNode::writeResultsToFile 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 462 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
ReactionAnalyzerNode::initEgoForTest has 2 complex conditionals with 4 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 152 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
Node has 83 lines, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
Check warning on line 305 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
ReactionAnalyzerNode::calculateResults has 6 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 488 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
ReactionAnalyzerNode::initEgoForTest 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 256 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
ReactionAnalyzerNode::spawnObstacle 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 tools/reaction_analyzer/src/reaction_analyzer_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 4.88 across 16 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 878 in tools/reaction_analyzer/src/topic_publisher.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
TopicPublisher::initRosbagPublishers has a cyclomatic complexity of 95, 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 106 in tools/reaction_analyzer/src/topic_publisher.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
TopicPublisher::pointcloudMessagesSyncPublisher 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 878 in tools/reaction_analyzer/src/topic_publisher.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
TopicPublisher::initRosbagPublishers has 10 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 878 in tools/reaction_analyzer/src/topic_publisher.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
TopicPublisher::initRosbagPublishers 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 686 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 11 functions with similar structure: SubscriberBase::detectedObjectsOutputCallback,SubscriberBase::detectedObjectsOutputCallback,SubscriberBase::pointcloud2OutputCallback,SubscriberBase::pointcloud2OutputCallback and 7 more functions. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 145 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
SubscriberBase::initReactionChainsAndParams has a cyclomatic complexity of 18, 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 452 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
SubscriberBase::initSubscribers has a cyclomatic complexity of 17, 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 495 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
SubscriberBase::getMessageBuffersMap 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 1066 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
SubscriberBase::findFirstBrakeIdx 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 558 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
SubscriberBase::controlCommandOutputCallback 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 574 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::trajectoryOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 612 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::trajectoryOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 748 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::predictedObjectsOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 777 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::predictedObjectsOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 806 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::detectedObjectsOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.
Check warning on line 853 in tools/reaction_analyzer/src/subscriber.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Conditional
SubscriberBase::detectedObjectsOutputCallback has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.