Skip to content

style(pre-commit): autofix

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jan 31, 2024 in 1m 9s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 16 findings(s) 🚩
  • Improving Code Health: 0 findings(s) ✅
  • Affected Hotspots: 1 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 reaction_analyzer_node.cpp: Node
  • Bumpy Road Ahead reaction_analyzer_node.cpp: Node
  • Complex Method map_based_prediction_node.cpp: MapBasedPredictionNode::objectsCallback 🔥
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::onTimer
  • Lines of Code in a Single File reaction_analyzer_node.cpp
  • Overall Code Complexity reaction_analyzer_node.cpp
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::printResults
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::initObservers
  • Deep, Nested Complexity reaction_analyzer_node.cpp: Node
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::findFirstBrakeIdx
  • Complex Conditional reaction_analyzer_node.cpp: ReactionAnalyzerNode::onTimer
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::initEgoForTest
  • Complex Method reaction_analyzer_node.cpp: ReactionAnalyzerNode::loadChainModules
  • Deep, Nested Complexity reaction_analyzer_node.cpp: ReactionAnalyzerNode::onTimer
  • Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::printResults
  • Bumpy Road Ahead reaction_analyzer_node.cpp: ReactionAnalyzerNode::onTimer

Annotations

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: Lines of Code in a Single File

This module has 1393 lines of code, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check warning on line 971 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

Node has a cyclomatic complexity of 89, 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 1094 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::onTimer 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 1222 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 15, 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 1439 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 1538 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 1580 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 1273 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 1066 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 Conditional

ReactionAnalyzerNode::onTimer 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 971 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

Node has 28 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 1222 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 1094 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::onTimer 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 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 8.30 across 27 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 971 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: Deep, Nested Complexity

Node has a nested complexity depth of 5, 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 1094 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: Deep, Nested Complexity

ReactionAnalyzerNode::onTimer 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 notice on line 1 in perception/map_based_prediction/src/map_based_prediction_node.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1643 to 1644, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check warning on line 1096 in perception/map_based_prediction/src/map_based_prediction_node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

MapBasedPredictionNode::objectsCallback already has high cyclomatic complexity, and now it increases in Lines of Code from 173 to 174. 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.