A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

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 23 hours ago
JSON representation

Repository metadata

Reduce the environmental footprint of your software programs with SonarQube

README.md

Logo

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 have a look of creedengo plugins with docker. Plase have a look at "Getting started" section of each plugin :

πŸ›’ Distribution

The main way to get creedengo plugins is to download them from your SonarQube Marketplace (available in Administration section).
But if you want, you can also download them from 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
1.4.+ SonarQube 9.4.+ LTS to 10.1
1.3.+ SonarQube 9.4.+ LTS to 10.0
1.2.+ SonarQube 9.4.+ LTS to 10.0
1.1.+ SonarQube 9.4.+ LTS to 9.9
1.0.+ SonarQube 9.4.+ LTS to 9.9
0.2.+ SonarQube 9.4.+ LTS to 9.9
0.1.+ SonarQube 8.9.+ LTS to 9.3

β˜• Plugin Java part compatibility (OLD ecocode plugin)

Plugins Version Java version
1.4.+ 11 / 17
1.3.+ 11 / 17
1.2.+ 11 / 17
1.1.+ 11 / 17
1.0.+ 11 / 17
0.2.+ 11 / 17
0.1.+ 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 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 :

Links


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 1,114
Total Committers: 76
Avg Commits per committer: 14.658
Development Distribution Score (DDS): 0.652

Commits in past year: 137
Committers in past year: 20
Avg Commits per committer in past year: 6.85
Development Distribution Score (DDS) in past year: 0.416

Name Email Commits
David DE CARVALHO d****5@g****m 388
David DE CARVALHO d****o@s****m 112
Olivier Le GoaΓ«r o****r@u****r 82
Jules Delecour 7****v 49
jycr j****r 48
Tristan ROULET t****t@v****r 41
Oussama o****2@g****m 38
utarwyn m****n@l****t 37
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
Nicolas DAVIET n****t@d****r 13
Hertout Julien j****t@s****r 13
plougastela a****l@c****m 12
Gilles Grousset g****t@i****r 12
Cyrille Chopelet c****t@c****m 10
Vianney de Bellabre D****s 9
alograg a****g@g****m 9
GrΓ©goire Compagnon g****e@k****r 7
Ludovic BossΓ© l****e@n****m 7
Silicoman l****n@h****r 7
Alexis Hillion a****n@o****r 5
Hiba 9****t 5
Julien Hertout j****t@n****m 5
OLLIVIER Elodie e****r@e****r 4
MP-Aubay m****d@a****m 4
jberque j****e@s****r 4
and 46 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 127
Total pull requests: 198
Average time to close issues: about 1 month
Average time to close pull requests: about 1 month
Total issue authors: 22
Total pull request authors: 28
Average comments per issue: 3.44
Average comments per pull request: 3.12
Merged pull request: 128
Bot issues: 0
Bot pull requests: 5

Past year issues: 3
Past year pull requests: 33
Past year average time to close issues: N/A
Past year average time to close pull requests: 3 months
Past year issue authors: 3
Past year pull request authors: 19
Past year average comments per issue: 3.0
Past year average comments per pull request: 2.73
Past year merged pull request: 6
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)
  • jycr (10)
  • egry35 (8)
  • glalloue (6)
  • utarwyn (6)
  • Silicoman (6)
  • laurentgoncalves (6)
  • obeone (6)
  • dependabot[bot] (5)
  • zippy1978 (4)
  • pbaumard (3)
  • tecbiio (3)
  • Djoums (2)
  • pataluc (2)

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)
  • :card_file_box: rule (22)
  • stale (22)
  • php (19)
  • :spiral_notepad: documentation (16)
  • :building_construction: refactoring (15)
  • java (13)
  • :syringe: bug (12)
  • dependencies (8)
  • πŸ”₯ in progress πŸ”₯ (6)
  • πŸ‘€ πŸ‘€ waiting commiter πŸ‘€ πŸ‘€ (5)
  • ✨ challenge2024 ✨ (5)
  • python (3)
  • rust (3)
  • __PRIO_HIGH__ (3)
  • duplicate (2)
  • πŸ† challenge2023 πŸ† (2)
  • :beginner: good first issue (1)
  • csharp (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: 9.89141497130186