-
Notifications
You must be signed in to change notification settings - Fork 79
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
Remove non-reachable code #371
Comments
Hi @skaslay1910, thank you for your ideas ! what do you think about them @vdebellabre for C#, @utarwyn for JS ? |
Hello @dedece35! |
Hello everyone, |
Remove non-reachable code
Platform
Rule short description
SonarQube as a code profiler has checks to list out unused variable, unused arguments etc but there are no rules to check for unused code. Intelligent editors of Java and .NET tackles this issue, but there is no way to detect this issue in Javascript and other scripting languages.
Rule complete description
Check for non-reachable code. Removing non-reachable code can lead to compiler optimization resulting in less CPU work, less memory usage and thus saving energy consumption
Also, leaving such unused code in the software results in maintainability issues for the support team. This results in increased efforts leading to increased usage of resources like device power consumption.
Optimized API: List Shallow Copy - Module copy
Platform
Main caracteristics
Severity / Remediation Cost
Rule short description
Using
copy.copy(x)
ofmodule copy
to perform a shallow copy of a list is not energy efficient.Rule complete description
Text
Using
copy.copy(x)
ofmodule copy
to perform a shallow copy of a list is not energy efficient.Prefer the usage of
list.copy()
which is more energy friendly.HTML
Implementation principle
copy
importcopy.copy()
The text was updated successfully, but these errors were encountered: