Skip to content

Dummy 222 bug fix#17

Open
IrmaKarasoftic wants to merge 3 commits intomainfrom
DUMMY-222-bug-fix
Open

Dummy 222 bug fix#17
IrmaKarasoftic wants to merge 3 commits intomainfrom
DUMMY-222-bug-fix

Conversation

@IrmaKarasoftic
Copy link
Owner

No description provided.

Copy link

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: 2 findings(s) 🚩
  • Improving Code Health: 7 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

🚩 Negative Code Health Impact (highest to lowest):

✅ Positive Code Health Impact (highest to lowest):

{
try
{
if (word == "A")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Getting better: Code Duplication
reduced similar code in: Calculate

Why does this problem occur?

Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health. Read more.

Comment on lines -175 to -233
if (word == "A")
{
if (word == "A")
{
if (word == "A")
{

}

}
else if (word.Contains("B"))
{
if (word == "BA")
{
if (word == "A")
{

}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Getting better: Complex Method
Add decreases in cyclomatic complexity from 18 to 10, threshold = 9

Why does this problem occur?

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. Read more.

Comment on lines -492 to -524
if (type == 1)
{
result = amount;
if (type == 1)
{
result = amount;
}
else if (type == 2)
{
result = (amount - (0.1m * amount)) - disc * (amount - (0.1m * amount));
}
else if (type == 3)
{
result = (0.7m * amount) - disc * (0.7m * amount);
}
else if (type == 4)
{
result = (amount - (0.5m * amount)) - disc * (amount - (0.5m * amount));
}
return result;
}
else if (type == 2)
{
result = (amount - (0.1m * amount)) - disc * (amount - (0.1m * amount));
}
else if (type == 3)
{
result = (0.7m * amount) - disc * (0.7m * amount);
}
else if (type == 4)
{
result = (amount - (0.5m * amount)) - disc * (amount - (0.5m * amount));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Complex Method
Calculate is no longer above the threshold for cyclomatic complexity

Why does this problem occur?

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. Read more.

{
try
{
if (word == "A")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Complex Method
Add is no longer above the threshold for cyclomatic complexity

Why does this problem occur?

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. Read more.

{
try
{
if (word == "A")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 9.25 to 7.38, threshold = 4

Why does this problem occur?

This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals. Read more.

Comment on lines -175 to -233
if (word == "A")
{
if (word == "A")
{
if (word == "A")
{

}

}
else if (word.Contains("B"))
{
if (word == "BA")
{
if (word == "A")
{

}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Bumpy Road Ahead
Add is no longer above the threshold for logical blocks with deeply nested code

Comment on lines -175 to -233
if (word == "A")
{
if (word == "A")
{
if (word == "A")
{

}

}
else if (word.Contains("B"))
{
if (word == "BA")
{
if (word == "A")
{

}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}
}
else if (word.Contains("B"))
{
if (word == "BA")
{

}
else if (word == "BB")
{

}
}
else if (word == "C")
{

}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No longer an issue: Deep, Nested Complexity
Add is no longer above the threshold for nested complexity depth

Comment on lines +108 to +109
if (word == "A")
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Getting worse: Complex Method
Add increases in cyclomatic complexity from 15 to 24, threshold = 9

Why does this problem occur?

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. Read more.

To ignore this warning click here.

{
if (word == "BA")
{
if (word == "A")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 6.15 to 7.54, threshold = 4

Why does this problem occur?

This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals. Read more.

To ignore this warning click here.

Copy link

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: 2 findings(s) 🚩
  • Improving Code Health: 7 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

🚩 Negative Code Health Impact (highest to lowest):

✅ Positive Code Health Impact (highest to lowest):

Copy link

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: 7 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

🚩 Negative Code Health Impact (highest to lowest):

✅ Positive Code Health Impact (highest to lowest):

Copy link

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: 7 findings(s) ✅
  • Affected Hotspots: 2 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

🚩 Negative Code Health Impact (highest to lowest):

✅ Positive Code Health Impact (highest to lowest):

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