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

fix(autoware_crosswalk_traffic_light_estimator): add process that guard access to empty elements #10281

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

fix for linter

8d208e7
Select commit
Loading
Failed to load commit list.
Open

fix(autoware_crosswalk_traffic_light_estimator): add process that guard access to empty elements #10281

fix for linter
8d208e7
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Mar 18, 2025 in 40s

CodeScene PR Check

Quality Gate Failed

Gates Failed
Enforce critical code health rules (1 file with Deep, Nested Complexity)
Enforce advisory code health rules (1 file with Complex Conditional)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
node.cpp 1 critical rule 6.76 → 6.28 Suppress
Enforce advisory code health rules Violations Code Health Impact
node.cpp 1 advisory rule 6.76 → 6.28 Suppress

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Deep, Nested Complexity node.cpp: CrosswalkTrafficLightEstimatorNode::setCrosswalkTrafficSignal
  • Complex Conditional node.cpp: CrosswalkTrafficLightEstimatorNode::updateFlashingState

Annotations

Check warning on line 358 in perception/autoware_crosswalk_traffic_light_estimator/src/node.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Conditional

CrosswalkTrafficLightEstimatorNode::updateFlashingState increases from 1 complex conditionals with 2 branches to 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 warning on line 310 in perception/autoware_crosswalk_traffic_light_estimator/src/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

CrosswalkTrafficLightEstimatorNode::setCrosswalkTrafficSignal 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.