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

Sourcery Refactorings #696

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

Sourcery Refactorings #696

wants to merge 2 commits into from

Conversation

Advik-B
Copy link

@Advik-B Advik-B commented Mar 20, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.24%.

Quality metrics Before After Change
Complexity 18.24 🙂 17.82 🙂 -0.42 👍
Method Length 97.05 🙂 97.02 🙂 -0.03 👍
Working memory 12.24 😞 12.26 😞 0.02 👎
Quality 48.27% 😞 48.51% 😞 0.24% 👍
Other metrics Before After Change
Lines 3930 3904 -26
Changed files Quality Before Quality After Quality Change
tools/power.py 43.41% 😞 43.62% 😞 0.21% 👍
tools/pw_exec.py 59.72% 🙂 59.90% 🙂 0.18% 👍
tools/trusted_2_6.py 56.04% 🙂 56.75% 🙂 0.71% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
tools/power.py main 81 ⛔ 892 ⛔ 23 ⛔ 3.13% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
tools/power.py powershell_obfuscation 74 ⛔ 704 ⛔ 17 ⛔ 7.26% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
tools/power.py Listener.psh_Local_Spawn_Shell 27 😞 550 ⛔ 19 ⛔ 16.10% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
tools/power.py Listener.psh_Local_Invoke 25 😞 307 ⛔ 17 ⛔ 21.83% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
tools/power.py generate_source 14 🙂 528 ⛔ 26 ⛔ 22.12% ⛔ Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

Sourcery AI and others added 2 commits March 17, 2022 08:06
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