-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Green IT rule: Remove non-reachable code #97
Comments
Hi @skaslay1910,
|
Hi |
Hi @skaslay1910, thank you for answer. I've just answered you in the issue green-code-initiative/creedengo-rules-specifications#371 to check if we can have a proof of this idea to confirm this new rule. |
This feature is actually very difficult to do properly and extensively. It is much better to rely on the compilers for this, they have a lot more information and resources than a linter, and many of them already display warnings when appropriate. |
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.
creedengo could setup a new rule to check for such 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
Request to look at it as a Green IT rule.
The text was updated successfully, but these errors were encountered: