diff --git a/CHANGELOG.md b/CHANGELOG.md index d46e871..277f0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [#88](https://github.com/green-code-initiative/creedengo-java/pull/88) Add new Java rule GCI94 - Use orElseGet instead of orElse -- [#88](https://github.com/green-code-initiative/creedengo-java/pull/88) Add new Java rule GCI82 - Make non reassigned variables constants +- [#89](https://github.com/green-code-initiative/creedengo-java/pull/89) Add new Java rule GCI82 - Make non reassigned variables constants ### Changed diff --git a/src/main/resources/org/greencodeinitiative/creedengo/java/creedengo_way_profile.json b/src/main/resources/org/greencodeinitiative/creedengo/java/creedengo_way_profile.json index 8c61366..059bf0f 100644 --- a/src/main/resources/org/greencodeinitiative/creedengo/java/creedengo_way_profile.json +++ b/src/main/resources/org/greencodeinitiative/creedengo/java/creedengo_way_profile.json @@ -17,7 +17,7 @@ "GCI77", "GCI78", "GCI79", - "GCI82", + "GCI82", "GCI94" ] } diff --git a/src/test/files/MakeNonReassignedVariablesConstants.java b/src/test/files/MakeNonReassignedVariablesConstants.java index a8e4039..bef640d 100644 --- a/src/test/files/MakeNonReassignedVariablesConstants.java +++ b/src/test/files/MakeNonReassignedVariablesConstants.java @@ -1,6 +1,6 @@ import java.util.logging.Logger; -public class GCI82MakeNonReassignedVariablesConstants { +public class MakeNonReassignedVariablesConstants { private final Logger logger = Logger.getLogger(""); // Compliant @@ -14,7 +14,7 @@ public class GCI82MakeNonReassignedVariablesConstants { private String varDefinedInClassReassigned = "0"; // Compliant private String varDefinedInConstructorReassigned = "1"; // Compliant - public GCI82MakeNonReassignedVariablesConstants() { + public MakeNonReassignedVariablesConstants() { varDefinedInConstructorReassigned = "3"; logger.info(varDefinedInConstructorReassigned); }