ecoCode

Reduce the environmental footprint of your programs with this cutting-edge SonarQube plugin.
https://github.com/green-code-initiative/creedengo-rules-specifications

Category: Consumption
Sub Category: Computation and Communication

Keywords

climate-change code-quality ecodesign ecoscore energy-efficiency sonarqube sonarqube-plugin static-analysis sustainability

Keywords from Contributors

green ecology quality ecoindex greenit smell climate green-ai green-computing green-software

Last synced: about 22 hours ago
JSON representation

Repository metadata

Reduce the environmental footprint of your software programs with SonarQube

README.md


creedengo is a collective project aiming to reduce environmental footprint of software at the code level. The goal of
the project is to provide a list of static code analyzers to highlight code structures that may have a negative
ecological impact: energy and resources over-consumption, "fatware", shortening terminals' lifespan, etc.

creedengo is based on evolving catalogs of good practices, for various technologies. A SonarQube plugin
then implements these catalogs as rules for scanning your projects.

Warning: this is still a very early stage project. Any feedback or contribution will be highly appreciated. Please
refer to the contribution section.

License: GPL v3
Contributor Covenant

🌿 SonarQube Plugins

7 technologies are supported by creedengo right now:

Screenshot

eco-design SonarQube plugin

Ekko logo

There are two kinds of plugins :

  • One for web / backoffice (PHP, Python, Java, JavaScript), using smells described in the 2nd edition of the repository
    published in september 2015.
    You can find all the
    rules here (in french).
    The current repository is for web / backOffice
  • One for mobile (Android/iOS), using a set of code smells theorised
    by Dr. Olivier Le GoaΓ«r.
    You can find this plugin in the repository here

How a SonarQube plugin works

Code is parsed to be transformed as AST. AST will allow you to access one or more nodes of your code.
For example, you’ll be able to access of all your for loop, to explore content etc.

To better understand AST structure, you can use the AST Explorer.

creedengo rules specification repository

This project contains the specifications of all creedengo rules, for all languages.

Structure

Rules are organized by folder based on their ID in the root rules folder.
Each of these folders contains a file with the metadata of the rule, and description by language.

The metadata file uses the format supported by
the SonarSource Analyzers Commons library.
To find out what values can be put there, we advise you to use the
official SonarQube documentation, and to
rely on already existing files.

Here is an example:

src/main/rules
β”œβ”€β”€ GCI104
β”‚   β”œβ”€β”€ java
β”‚   β”‚   β”œβ”€β”€ GCI104.asciidoc
β”‚   β”‚   β”œβ”€β”€ GCI104.json
β”‚   β”œβ”€β”€ php
β”‚   β”‚   β”œβ”€β”€ GCI104.asciidoc
β”‚   β”œβ”€β”€ python
β”‚   β”‚   β”œβ”€β”€ GCI104.asciidoc
β”‚   └── GCI104.json
β”œβ”€β”€ ...

To specify metadata for a given language (for example deprecate a rule only for a single language), it is possible to
create a json file in the language folder, and this will be merged with the common file during build. The keys in the
specific file have priority and it is possible to add new ones but not to delete them from the global one.

Description language

The description of the rules uses the ASCIIDOC format (
with Markdown compatibility)
in order to allow the inclusion of other pages (this feature is not available in standard with Markdown).

See:

πŸš€ Getting Started

You can quickly explore Creedengo plugins using Docker. Refer to the "Getting Started" section of each plugin for
detailed instructions:

πŸ›’ Distribution

The primary way to obtain Creedengo plugins is through the SonarQube Marketplace, accessible in the Administration
section. Alternatively, you can download them directly from the GitHub releases.

We had split our plugins repository creedengo to one repository for each plugin on december 2023.
Thus, plugin versions are available on 2 repositories depending on version you want :

🧩 Plugins version compatibility (OLD ecocode plugin)

Plugins Version SonarQube version Java version
1.4+ SonarQube 9.4.+ LTS to 10.1 11 / 17
1.2.x, 1.3.x SonarQube 9.4.+ LTS to 10.0 11 / 17
0.2.x, 1.0.x, 1.1.x SonarQube 9.4.+ LTS to 9.9 11 / 17
0.1.x SonarQube 8.9.+ LTS to 9.3 11 / 17

🀝 Contribution

You are a technical expert, a designer, a project manager, a CSR expert, an ecodesign expert...

You want to offer the help of your company, help us to organize, communicate on the project ?

You have ideas to submit to us ?

We are listening to you to make the project progress collectively, and maybe with you !

WE NEED YOU !

Here is the Starter pack

πŸ€“ Main contributors

Any question ? We are here for you !
first, create an issue, please.
Then, if no answer, contact ...

🧐 Core Team Emeriti

Here we honor some no-longer-active core team members who have made valuable contributions in the past.

They have contributed to the success of creedengo :

They supported the project :


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 14 days ago

Total Commits: 1,132
Total Committers: 78
Avg Commits per committer: 14.513
Development Distribution Score (DDS): 0.653

Commits in past year: 129
Committers in past year: 21
Avg Commits per committer in past year: 6.143
Development Distribution Score (DDS) in past year: 0.481

Name Email Commits
David DE CARVALHO d****5@g****m 393
David DE CARVALHO d****o@s****m 112
Olivier Le GoaΓ«r o****r@u****r 82
jycr j****r 49
Jules Delecour 7****v 49
Tristan ROULET t****t@v****r 41
utarwyn m****n@l****t 39
Oussama o****2@g****m 38
Mohamed SALHAOUI 5****S 24
Aghiles Azzoug e****g@e****z 22
LinkinFoxCo m****r@v****r 20
Jean-Baptiste GINGUENE j****e@s****m 20
Geoffrey LallouΓ© g****e 16
David Crescence d****e@o****m 13
Hertout Julien j****t@s****r 13
Nicolas DAVIET n****t@d****r 13
plougastela a****l@c****m 12
Gilles Grousset g****t@i****r 12
Cyrille Chopelet c****t@c****m 10
alograg a****g@g****m 9
Vianney de Bellabre D****s 9
Maxime DANIEL m****8@g****m 8
GrΓ©goire Compagnon g****e@k****r 7
Ludovic BossΓ© l****e@n****m 7
Silicoman l****n@h****r 7
Julien Hertout j****t@n****m 5
Hiba 9****t 5
Alexis Hillion a****n@o****r 5
OLLIVIER Elodie e****r@e****r 4
MP-Aubay m****d@a****m 4
and 48 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 133
Total pull requests: 261
Average time to close issues: about 1 month
Average time to close pull requests: about 1 month
Total issue authors: 25
Total pull request authors: 47
Average comments per issue: 3.32
Average comments per pull request: 2.59
Merged pull request: 137
Bot issues: 0
Bot pull requests: 5

Past year issues: 9
Past year pull requests: 75
Past year average time to close issues: 3 days
Past year average time to close pull requests: 6 days
Past year issue authors: 6
Past year pull request authors: 29
Past year average comments per issue: 1.56
Past year average comments per pull request: 0.99
Past year merged pull request: 13
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/green-code-initiative/creedengo-rules-specifications

Top Issue Authors

  • dedece35 (61)
  • jycr (9)
  • glalloue (6)
  • fatenhomrani (3)
  • obeone (3)
  • natixis-caen (3)
  • egry35 (3)
  • guiyom19 (3)
  • seenusankar (3)
  • LordPatate (3)
  • ambre2222 (3)
  • AntoineMeheut (3)
  • matthieumarrast (3)
  • jbuiquan (3)
  • hyp-test-auto (3)

Top Pull Request Authors

  • dedece35 (88)
  • oussamaLaribi (27)
  • cleophass (16)
  • jycr (14)
  • utarwyn (8)
  • egry35 (8)
  • laurentgoncalves (6)
  • obeone (6)
  • glalloue (6)
  • pataluc (6)
  • Silicoman (6)
  • dependabot[bot] (5)
  • zippy1978 (4)
  • max-208 (3)
  • tecbiio (3)

Top Issue Labels

  • java (49)
  • :syringe: bug (41)
  • :rocket: enhancement (30)
  • php (30)
  • __PRIO_MEDIUM__ (27)
  • :card_file_box: rule (27)
  • python (27)
  • __PRIO_HIGH__ (22)
  • :building_construction: refactoring (21)
  • :spiral_notepad: documentation (21)
  • __PRIO_LOW__ (15)
  • :beginner: good first issue (12)
  • πŸ† challenge2023 πŸ† (9)
  • duplicate (3)
  • πŸ‘€ πŸ‘€ review done πŸ‘€ πŸ‘€ (3)
  • :grey_question: question (3)
  • πŸ”₯ in progress πŸ”₯ (3)

Top Pull Request Labels

  • :rocket: enhancement (43)
  • πŸ‘€ πŸ‘€ waiting commiter πŸ‘€ πŸ‘€ (34)
  • stale (27)
  • :card_file_box: rule (22)
  • php (19)
  • :spiral_notepad: documentation (16)
  • :building_construction: refactoring (15)
  • :syringe: bug (14)
  • java (13)
  • dependencies (8)
  • πŸ”₯ in progress πŸ”₯ (5)
  • ✨ challenge2024 ✨ (5)
  • python (3)
  • rust (3)
  • __PRIO_HIGH__ (3)
  • πŸ‘€ πŸ‘€ review done πŸ‘€ πŸ‘€ (3)
  • duplicate (2)
  • πŸ† challenge2023 πŸ† (2)
  • :beginner: good first issue (1)
  • csharp (1)
  • πŸ’‘ rule idea (1)

Dependencies

.github/workflows/build.yml actions
  • actions/cache v1 composite
  • actions/checkout v3 composite
  • actions/setup-java v1 composite
  • gradle/gradle-build-action v2 composite
pom.xml maven
  • org.sonarsource.java:sonar-java-plugin 7.15.0.30507 provided
  • org.sonarsource.php:sonar-php-plugin 3.25.0.9077 provided
  • org.sonarsource.python:sonar-python-plugin 3.19.0.10254 provided
  • org.sonarsource.sonarqube:sonar-plugin-api 9.4.0.54424 provided
  • org.sonarsource.analyzer-commons:sonar-analyzer-commons 2.1.0.1111
  • org.sonarsource.sonarqube:sonar-plugin-api-impl 9.7.1.62043
  • junit:junit 4.13.2 test
  • org.assertj:assertj-core 3.23.1 test
  • org.junit.jupiter:junit-jupiter 5.9.1 test
  • org.junit.jupiter:junit-jupiter-migrationsupport 5.9.1 test
  • org.sonarsource.java:java-checks-testkit 7.15.0.30507 test
  • org.sonarsource.python:python-checks-testkit 3.19.0.10254 test
.github/workflows/publish_to_maven_central.yml actions
  • actions/cache v1 composite
  • actions/checkout v3 composite
  • actions/setup-java v3 composite
.github/workflows/stale_tag.yml actions
  • actions/stale v8.0.0 composite
ecocode-rules-specifications/pom.xml maven
  • org.sonarsource.sonarqube:sonar-plugin-api provided
  • org.sonarsource.analyzer-commons:sonar-analyzer-commons
  • org.assertj:assertj-core test
  • org.junit.jupiter:junit-jupiter test

Score: 10.026589749670112