-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
green-code-initiative#92 refactor(rule/php): moves PHP rules into `ec…
…ocode-rules-specifications` module
- Loading branch information
Showing
17 changed files
with
167 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.1" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.1 https://maven.apache.org/xsd/assembly-2.1.1.xsd"> | ||
<id>php</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.outputDirectory}</directory> | ||
<includes> | ||
<include>io/ecocode/rules/php/*.class</include> | ||
</includes> | ||
<outputDirectory/> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.build.directory}/php</directory> | ||
<outputDirectory>io/ecocode/rules/php/specifications</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
8 changes: 8 additions & 0 deletions
8
ecocode-rules-specifications/src/main/java/io/ecocode/rules/php/PhpRulesRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.ecocode.rules.php; | ||
|
||
public class PhpRulesRepository { | ||
public static final String REPOSITORY_KEY = "ecocode-php"; | ||
public static final String NAME = "ecoCode"; | ||
public static final String LANGUAGE = "php"; | ||
public static final String RESOURCE_BASE_PATH = PhpRulesRepository.class.getPackageName().replace('.', '/') + "/specifications"; | ||
} |
15 changes: 15 additions & 0 deletions
15
ecocode-rules-specifications/src/main/rules/EC22/EC22.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Use of methods for basic operations", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"eco-design", | ||
"performance", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
ecocode-rules-specifications/src/main/rules/EC34/EC34.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Avoid using try-catch-finally statement", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"eco-design", | ||
"performance", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
ecocode-rules-specifications/src/main/rules/EC66/EC66.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Avoid using double quote (\"), prefer using simple quote (')", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "5min" | ||
}, | ||
"tags": [ | ||
"eco-design", | ||
"performance", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters