-
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/python): moves Python rules in…
…to `ecocode-rules-specifications` module
- Loading branch information
Showing
20 changed files
with
198 additions
and
100 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>python</id> | ||
<formats> | ||
<format>jar</format> | ||
</formats> | ||
<includeBaseDirectory>false</includeBaseDirectory> | ||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.outputDirectory}</directory> | ||
<includes> | ||
<include>io/ecocode/rules/python/*.class</include> | ||
</includes> | ||
<outputDirectory/> | ||
</fileSet> | ||
<fileSet> | ||
<directory>${project.build.directory}/python</directory> | ||
<outputDirectory>io/ecocode/rules/python/specifications</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
</assembly> |
8 changes: 8 additions & 0 deletions
8
...ifications/src/main/java/io/ecocode/rules/python/PythonRulesSpecificationsRepository.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.python; | ||
|
||
public class PythonRulesSpecificationsRepository { | ||
public static final String REPOSITORY_KEY = "ecocode-python"; | ||
public static final String NAME = "ecoCode"; | ||
public static final String LANGUAGE = "py"; | ||
public static final String RESOURCE_BASE_PATH = PythonRulesSpecificationsRepository.class.getPackageName().replace('.', '/') + "/specifications"; | ||
} |
14 changes: 14 additions & 0 deletions
14
ecocode-rules-specifications/src/main/rules/EC10/EC10.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,14 @@ | ||
{ | ||
"title": "Avoid using unoptimized vector images", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "60min" | ||
}, | ||
"tags": [ | ||
"eco-design", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
ecocode-rules-specifications/src/main/rules/EC203/EC203.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,16 @@ | ||
{ | ||
"title": "Detect unoptimized image format", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "60min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"user-experience", | ||
"eco-design", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
ecocode-rules-specifications/src/main/rules/EC404/EC404.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 generator comprehension instead of list comprehension in for loop declaration", | ||
"type": "CODE_SMELL", | ||
"status": "ready", | ||
"remediation": { | ||
"func": "Constant\/Issue", | ||
"constantCost": "15min" | ||
}, | ||
"tags": [ | ||
"performance", | ||
"eco-design", | ||
"ecocode" | ||
], | ||
"defaultSeverity": "Minor" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "Avoid creating getter and setter methods in classes", | ||
"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.
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