-
Notifications
You must be signed in to change notification settings - Fork 10
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
add nested complexity #72
base: master
Are you sure you want to change the base?
Conversation
17d0513
to
149c692
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Quality Gates: OK
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Inconclusive -- Not enough commits to recommend a review strategy. The recommendation will be enabled automatically once you have more development activity.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Deep, Nested Complexity js-example.js: mark_purchased - Low 🔥
149c692
to
3fba4c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Quality Gates: OK
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Inconclusive -- Not enough commits to recommend a review strategy. The recommendation will be enabled automatically once you have more development activity.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Deep, Nested Complexity js-example.js: mark_purchased - Low 🔥
Change-Id: I9eda989f7f0f13210bc66932a50455345c02eb7a
3fba4c6
to
6e5c9bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Quality Gates: FAILED
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Inconclusive -- Not enough commits to recommend a review strategy. The recommendation will be enabled automatically once you have more development activity.
View detailed results in CodeScene
🚩 Negative Code Health Impact (highest to lowest):
- Deep, Nested Complexity js-example.js: mark_purchased - Low 🔥
function mark_purchased(transaction) { | ||
transaction.state = TransactionState.PURCHASED | ||
for (item in transaction.items) { | ||
if (item.mtb_product_ids) { | ||
if (item.mtb_product_ids) { | ||
for (mp_id in item.mtb_product_ids) { | ||
try { | ||
mtb_prod = get_db_mtb_product(None, mp_id, all=True, refresh=False) | ||
mtb_prod.purchased = True | ||
mtb_prod.save() | ||
} | ||
catch(exc) { | ||
logger.error("Failed to mark mtb_product {mp_id} as purchase", exc_info=exc) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ New issue: Deep, Nested Complexity Impact on Code Health Score -0.5 (-0.5 in this PR)
mark_purchased has a nested complexity depth of 4, threshold = 4
Why does this problem occur?
This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health. Read more.
To ignore this warning click here.
Change-Id: I9eda989f7f0f13210bc66932a50455345c02eb7a