diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java index 2d2f118..0549bfc 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidDoubleQuoteCheck.java @@ -31,6 +31,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI66") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC66") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S66") public class AvoidDoubleQuoteCheck extends PHPSubscriptionCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java index 29f5ee6..fb8ea27 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidFullSQLRequestCheck.java @@ -29,6 +29,7 @@ import java.util.regex.Pattern; @Rule(key = "GCI74") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC74") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S74") public class AvoidFullSQLRequestCheck extends PHPSubscriptionCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java index 693db9a..c3a11f4 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidGettingSizeCollectionInLoopCheck.java @@ -27,12 +27,14 @@ import org.sonar.plugins.php.api.tree.statement.StatementTree; import org.sonar.plugins.php.api.tree.statement.WhileStatementTree; import org.sonar.plugins.php.api.visitors.PHPSubscriptionCheck; +import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; import java.util.Arrays; import java.util.List; import java.util.regex.Pattern; @Rule(key = "GCI3") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC3") public class AvoidGettingSizeCollectionInLoopCheck extends PHPSubscriptionCheck { public static final String ERROR_MESSAGE = "Avoid getting the size of the collection in the loop"; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java index 1af1ea9..2322d5f 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidMultipleIfElseStatementCheck.java @@ -26,6 +26,7 @@ import org.sonar.plugins.php.api.tree.expression.VariableIdentifierTree; import org.sonar.plugins.php.api.tree.statement.*; import org.sonar.plugins.php.api.visitors.PHPSubscriptionCheck; +import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; import java.util.HashMap; import java.util.List; @@ -41,6 +42,7 @@ * - IF and ELSEIF statements are considered as an IF statement */ @Rule(key = "GCI2") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC2") public class AvoidMultipleIfElseStatementCheck extends PHPSubscriptionCheck { public static final String ERROR_MESSAGE = "Use a switch statement instead of multiple if-else if possible"; diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java index 75f1a85..af74d97 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidSQLRequestInLoopCheck.java @@ -35,6 +35,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI72") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC72") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S72") public class AvoidSQLRequestInLoopCheck extends PHPSubscriptionCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchWithFileOpenedCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchWithFileOpenedCheck.java index 5a64ab4..6c83da4 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchWithFileOpenedCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidTryCatchWithFileOpenedCheck.java @@ -32,6 +32,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI35") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC35") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S34") @DeprecatedRuleKey(ruleKey = "EC34") diff --git a/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java index 7cd5354..24b7364 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/AvoidUsingGlobalVariablesCheck.java @@ -25,6 +25,7 @@ import java.util.regex.Pattern; @Rule(key = "GCI4") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC4") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "D4") public class AvoidUsingGlobalVariablesCheck extends PHPVisitorCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java b/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java index 269741f..76ac31f 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/IncrementCheck.java @@ -27,6 +27,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI67") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC67") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S67") public class IncrementCheck extends PHPSubscriptionCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java b/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java index 8932bd2..f3dd204 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/NoFunctionCallWhenDeclaringForLoop.java @@ -31,6 +31,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI69") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC69") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "S69") public class NoFunctionCallWhenDeclaringForLoop extends PHPSubscriptionCheck { diff --git a/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java b/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java index 4be1cc6..7e54daf 100644 --- a/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java +++ b/src/main/java/fr/greencodeinitiative/php/checks/UseOfMethodsForBasicOperations.java @@ -35,6 +35,7 @@ import org.sonarsource.analyzer.commons.annotations.DeprecatedRuleKey; @Rule(key = "GCI22") +@DeprecatedRuleKey(repositoryKey = "ecocode-php", ruleKey = "EC22") @DeprecatedRuleKey(repositoryKey = "gci-php", ruleKey = "D2") public class UseOfMethodsForBasicOperations extends PHPSubscriptionCheck {