Held or removed rules
The implementation of the following rules has been held, deprecated or removed due to various issues, detailed in further details below.
Rules to be reworked / measured / clarified
This table lists rules proposed by the community, but they have to be reworked / measured / clarified before being implemented in ecoCode plugins. (Issues and PR are closed, but they can be reopened once rework is launched.)
| Rule key | Language | Name | Description | Invalidation |
|---|---|---|---|---|
CRJVM204 |
Java |
Detect unoptimized file formats |
We have to clarify and rework this rule for Java before accepting the implementation |
|
EC22 |
Java |
The use of methods for basic operations |
We have to measure this rule for Java before accepting the implementation |
|
EC22 |
PHP |
The use of methods for basic operations |
We have to measure this rule for PHP before accepting the implementation |
|
EC53 |
Java |
Using arrays in foreach loops |
No good arguments and not enough green measures. |
|
GRSP0007 |
PHP |
Prefer using foreach |
We have to clarify and measure this rule for PHP before accepting the implementation |
|
GRSP0008 |
PHP |
Avoid using relative path |
We have to clarify and measure this rule for PHP before accepting the implementation |
|
Java |
Avoid returning a JPA Entity in a RestController |
We have to clarify and measure this rule for Java before accepting the implementation |
Deprecated rules
This table lists rules proposed by the community but deprecated in ecoCode plugins with the justification. These rules will be completely deleted in next releases and moved to bottom deleted rules array.
| Rule key | Language | Name | Description | Invalidation |
|---|---|---|---|---|
EC34 |
Java / Python / PHP |
Using try…catch…finally calls |
Implementation is too simple (only detection of presence of "try" statement) AND replaced by |
Github discussion with measures: general/Java / Python / PHP |
EC69 |
Python |
Calling a loop invariant function in a loop condition |
Finally, not applicable for Python |
Refused / deleted rules
This table lists rules proposed by the community but refused or/and deleted in ecoCode plugins with the justification.
| Rule key | Language | Name | Description | Invalidation |
|---|---|---|---|---|
CRDOM203 |
HTML |
HTML page must contain a doctype tag |
The difference in performance is negligible, this rule is more related to the user experience. |
|
CRPYT |
Python |
Use numpy array instead of standard list |
The use of numpy library to perform array manipulation is more energy efficient than the use of the standard list functions. |
|
EC4 |
Java |
Avoid using global variables |
Global variables do not exist in Java. |
|
EC8 |
JavaScript |
Avoid using high accuracy geolocation |
The rule has been merged with the rule EC523 |
|
EC63 |
Java |
Unnecessarily assigning values to variables |
There are already 3 native SonarQube rules for Java. |
|
EC66 |
Python |
Use single quote (') instead of quotation mark (") |
Finally, not applicable for Python |
|
EC75 |
Java |
Don’t concatenate strings in loops |
Optimizations on Java concatenation Strings are useless since JDK8 |