-
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 some long methods #56
base: master
Are you sure you want to change the base?
Conversation
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: 3 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 0 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):
- Large Method c-example.c: a_long_fn
- Large Method c-example.c: another_long_fn
- Code Duplication c-example.c
if (a > b) { | ||
do_e(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
} | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
return 0; | ||
} |
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: Code Duplication
The module contains 2 functions with similar structure: a_long_fn,another_long_fn
Why does this problem occur?
Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health. Read more.
To ignore this warning click here.
if (a > b) { | ||
do_e(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
} | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
return 0; | ||
} |
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: Large Method
a_long_fn has 133 lines, threshold = 70
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
if (a > b) { | ||
do_e(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
do_d(); | ||
} | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
|
||
do_a(); | ||
do_a(); | ||
do_a(); | ||
|
||
|
||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
do_b(); | ||
|
||
|
||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
do_c(); | ||
|
||
return 0; | ||
} |
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: Large Method
another_long_fn has 133 lines, threshold = 70
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
Testing Large methods...