Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pointcloud_preprocessor): blockage_diag #5932

Merged
merged 13 commits into from
Feb 27, 2024

Merge branch 'main' into refactor/blockage

8ae646b
Select commit
Loading
Failed to load commit list.
Merged

refactor(pointcloud_preprocessor): blockage_diag #5932

Merge branch 'main' into refactor/blockage
8ae646b
Select commit
Loading
Failed to load commit list.
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: 1 findings(s) 🚩
  • Improving Code Health: 3 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 Conditional blockage_diag_nodelet.cpp: BlockageDiagComponent::filter

✅ Improving Code Health:

  • Complex Method blockage_diag_nodelet.cpp: BlockageDiagComponent::filter
  • Bumpy Road Ahead blockage_diag_nodelet.cpp: BlockageDiagComponent::filter
  • Deep, Nested Complexity blockage_diag_nodelet.cpp: BlockageDiagComponent::filter

Annotations

Check notice on line 302 in sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp

See this annotation in the file changed.

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

✅ Getting better: Complex Method

BlockageDiagComponent::filter decreases in cyclomatic complexity from 25 to 24, 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 194 in sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

BlockageDiagComponent::filter has 1 complex conditionals with 3 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 notice on line 302 in sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp

See this annotation in the file changed.

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

✅ Getting better: Bumpy Road Ahead

BlockageDiagComponent::filter decreases from 8 to 7 logical blocks with deeply nested code, threshold is one single 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 notice on line 302 in sensing/pointcloud_preprocessor/src/blockage_diag/blockage_diag_nodelet.cpp

See this annotation in the file changed.

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

✅ Getting better: Deep, Nested Complexity

BlockageDiagComponent::filter decreases in nested complexity depth from 5 to 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.