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

add nested complexity #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add nested complexity #72

wants to merge 1 commit into from

Conversation

knorrest
Copy link
Contributor

@knorrest knorrest commented Jan 5, 2023

Change-Id: I9eda989f7f0f13210bc66932a50455345c02eb7a

@knorrest knorrest force-pushed the minor-degradation branch 3 times, most recently from 17d0513 to 149c692 Compare January 5, 2023 10:46
Copy link

@kalletest kalletest bot left a 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):

Copy link

@kalletest kalletest bot left a 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):

Change-Id: I9eda989f7f0f13210bc66932a50455345c02eb7a
Copy link

@kalletest kalletest bot left a 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):

Comment on lines +169 to +187
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)
}
}
}
}
}
}
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant