creedengo-rules-specifications

Reduce the environmental footprint of your software programs with SonarQube

https://github.com/green-code-initiative/creedengo-rules-specifications

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 80 committers (1.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

climate-change code-quality ecodesign ecoscore energy-efficiency sonarqube sonarqube-plugin static-analysis sustainability
Last synced: 6 months ago · JSON representation

Repository

Reduce the environmental footprint of your software programs with SonarQube

Basic Info
Statistics
  • Stars: 204
  • Watchers: 12
  • Forks: 105
  • Open Issues: 78
  • Releases: 16
Topics
climate-change code-quality ecodesign ecoscore energy-efficiency sonarqube sonarqube-plugin static-analysis sustainability
Created about 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing

README.md

Creedengo logo

A Green Code Initiative project


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:

text 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

  • Name: Green Code Initiative
  • Login: green-code-initiative
  • Kind: organization
  • Email: contact@green-code-initiative.org
  • Location: France

Let's write low-carbon software

GitHub Events

Total
  • Create event: 34
  • Issues event: 7
  • Watch event: 33
  • Delete event: 11
  • Member event: 1
  • Issue comment event: 145
  • Push event: 132
  • Pull request review comment event: 116
  • Pull request review event: 131
  • Pull request event: 75
  • Fork event: 22
Last Year
  • Create event: 34
  • Issues event: 7
  • Watch event: 33
  • Delete event: 11
  • Member event: 1
  • Issue comment event: 145
  • Push event: 132
  • Pull request review comment event: 116
  • Pull request review event: 131
  • Pull request event: 75
  • Fork event: 22

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 1,193
  • Total Committers: 80
  • Avg Commits per committer: 14.913
  • Development Distribution Score (DDS): 0.65
Past Year
  • Commits: 139
  • Committers: 13
  • Avg Commits per committer: 10.692
  • Development Distribution Score (DDS): 0.532
Top Committers
Name Email Commits
David DE CARVALHO d****5@g****m 417
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
Cléophas Fournier c****r@g****m 31
Mohamed SALHAOUI 5****S 24
Aghiles Azzoug e****g@e****z 22
Jean-Baptiste GINGUENE j****e@s****m 20
LinkinFoxCo m****r@v****r 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
Maxime DANIEL m****8@g****m 10
Cyrille Chopelet c****t@c****m 10
alograg a****g@g****m 9
Vianney de Bellabre D****s 9
Grégoire Compagnon g****e@k****r 7
Ludovic Bossé l****e@n****m 7
Silicoman l****n@h****r 7
Luc Fouin l****n@g****m 6
Julien Hertout j****t@n****m 5
Hiba 9****t 5
Alexis Hillion a****n@o****r 5
and 50 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 48
  • Total pull requests: 161
  • 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: 44
  • Average comments per issue: 3.13
  • Average comments per pull request: 1.81
  • Merged pull requests: 61
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 6
  • Pull requests: 89
  • Average time to close issues: 3 days
  • Average time to close pull requests: 11 days
  • Issue authors: 6
  • Pull request authors: 28
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.66
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dedece35 (21)
  • jycr (3)
  • glalloue (2)
  • 7PH (1)
  • fatenhomrani (1)
  • obeone (1)
  • skaslay1910 (1)
  • natixis-caen (1)
  • egry35 (1)
  • guiyom19 (1)
  • seenusankar (1)
  • AviElkharrat (1)
  • MP-Aubay (1)
  • LordPatate (1)
  • ambre2222 (1)
Pull Request Authors
  • dedece35 (35)
  • cleophass (25)
  • jycr (11)
  • oussamaLaribi (9)
  • utarwyn (8)
  • egry35 (6)
  • pataluc (4)
  • dependabot[bot] (4)
  • Djoums (3)
  • fbezagu (3)
  • AmarSALHI-code (2)
  • obeone (2)
  • NETOIK (2)
  • FlorianC35 (2)
  • zippy1978 (2)
Top Labels
Issue Labels
java (17) :syringe: bug (14) :rocket: enhancement (10) php (10) __PRIO_MEDIUM__ (9) :card_file_box: rule (9) python (9) :building_construction: refactoring (7) :spiral_notepad: documentation (7) __PRIO_HIGH__ (7) __PRIO_LOW__ (5) :beginner: good first issue (4) 🏆 challenge2023 🏆 (3) duplicate (1) 👀 👀 review done 👀 👀 (1) :grey_question: question (1) 🔥 in progress 🔥 (1)
Pull Request Labels
👀 👀 waiting commiter 👀 👀 (20) stale (17) :rocket: enhancement (16) :card_file_box: rule (14) php (7) :spiral_notepad: documentation (6) :syringe: bug (6) :building_construction: refactoring (5) java (5) dependencies (5) ✨ challenge2024 ✨ (4) 🔥 in progress 🔥 (2) 👀 👀 review done 👀 👀 (2) rust (1) python (1) __PRIO_HIGH__ (1) csharp (1) duplicate (1) 🏆 challenge2023 🏆 (1) 💡 rule idea (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 13
repo1.maven.org: org.green-code-initiative:creedengo-rules-specifications

Repository that contains the specifications of every static-analysis rules available in creedengo plugins.

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 32.8%
Average: 39.8%
Dependent packages count: 46.9%
Last synced: 6 months ago

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