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

Remove deprecated rules for EC4/EC53/EC63/EC75 for JAVA #272

Merged
merged 10 commits into from
Feb 2, 2024
8 changes: 4 additions & 4 deletions RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@ This table lists rules proposed by the community but deprecated in ecoCode plugi

| Rule key | Language | Name | Description | Invalidation |
|----------|---------------------|----------------------------------------------------|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| EC4 | Java | Avoid using global variables | Global variables do not exist in Java. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/233) |
| EC34 | Java / Python / PHP | Using try...catch...finally calls | Implementation is too simple (only detection of presence of "try" statement) AND replaced by `EC35` rule | Github discussion with measures : [general/java](https://github.com/green-code-initiative/ecoCode/pull/128) / [python](https://github.com/green-code-initiative/ecoCode-python/pull/6) / [php](https://github.com/green-code-initiative/ecoCode-php/pull/10) |
| EC53 | Java | Using arrays in foreach loops | No good arguments and not enough green measures. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/240) |
| EC63 | Java | Unnecessarily assigning values to variables | There are already 3 native SonarQube rules for Java. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/pull/258) |
| EC66 | Python | Use single quote (') instead of quotation mark (") | Finally, not applicable for Python | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode-python/issues/4) |
| EC75 | Java | Concatenate Strings in loop | Optimizations on Java concatenation Strings are useless since JDK8 | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/246) |

## Refused / Deleted rules

Expand All @@ -85,3 +81,7 @@ This table lists rules proposed by the community but refused or/and deleted in e
|----------|----------|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CRDOM203 | HTML | HTML page must contain a doctype tag | The difference in performance is negligible, this rule is more related to the user experience. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/103) |
| 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. | [Github discussion with measures](https://github.com/green-code-initiative/ecoCode/issues/132) |
| EC4 | Java | Avoid using global variables | Global variables do not exist in Java. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/233) |
| EC53 | Java | Using arrays in foreach loops | No good arguments and not enough green measures. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/240) |
alograg marked this conversation as resolved.
Show resolved Hide resolved
| EC63 | Java | Unnecessarily assigning values to variables | There are already 3 native SonarQube rules for Java. | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/pull/258) |
| EC75 | Java | Concatenate Strings in loop | Optimizations on Java concatenation Strings are useless since JDK8 | [Github discussion with sources](https://github.com/green-code-initiative/ecoCode/issues/246) |
2 changes: 1 addition & 1 deletion ecocode-rules-specifications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.ecocode</groupId>
<artifactId>ecocode-parent</artifactId>
<version>1.4.8-SNAPSHOT</version>
<version>1.4.9-SNAPSHOT</version>
alograg marked this conversation as resolved.
Show resolved Hide resolved
</parent>

<artifactId>ecocode-rules-specifications</artifactId>
Expand Down
15 changes: 0 additions & 15 deletions ecocode-rules-specifications/src/main/rules/EC4/EC4.json

This file was deleted.

41 changes: 0 additions & 41 deletions ecocode-rules-specifications/src/main/rules/EC4/java/EC4.asciidoc

This file was deleted.

3 changes: 0 additions & 3 deletions ecocode-rules-specifications/src/main/rules/EC4/java/EC4.json

This file was deleted.

29 changes: 0 additions & 29 deletions ecocode-rules-specifications/src/main/rules/EC4/php/EC4.asciidoc

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions ecocode-rules-specifications/src/main/rules/EC63/EC63.json

This file was deleted.

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions ecocode-rules-specifications/src/main/rules/EC75/EC75.json

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.ecocode</groupId>
<artifactId>ecocode-parent</artifactId>
<version>1.4.8-SNAPSHOT</version>
<version>1.4.9-SNAPSHOT</version>
alograg marked this conversation as resolved.
Show resolved Hide resolved
<packaging>pom</packaging>

<name>ecoCode Sonar Plugins Project</name>
Expand Down