Git Product home page Git Product logo

ecocode's Introduction

Logo

ecoCode 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.

ecoCode 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

4 technologies are supported by ecoCode right now:

Screenshot

eco-design SonarQube plugin

Ekko logo

There is two kind 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), using a set of smells theorised by Olivier Le Goaër for Android. 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.

JavaScript plugin works differently because it does not use AST. More information here

🚀 Getting Started

You can give a try with a one command docker :

docker run -ti --rm \
       -v sq_ecocode_logs:/opt/sonarqube/logs \
       -v sq_ecocode_data:/opt/sonarqube/data \
       -p 9000:9000 \
       --name sonarqube-ecocode ghcr.io/green-code-initiative/sonarqube-ecocode:latest

And add the eco-design tagged rules to Quality Profiles.

You can also download each plugin separatly and copy the plugin (jar file) to $SONAR_INSTALL_DIR/extensions/plugins and restart SonarQube. Then you can use different test project repositories (please check README.md files inside) to test the environment. Example : PHP test project

Or you can directly use a all-in-one docker-compose

🛒 Distribution

Ready to use binaries are available from GitHub.

🧩 Plugins version compatibility

Plugins Version SonarQube version
0.1.+ SonarQube 8.9.+ LTS to 9.3
0.2.+ SonarQube 9.4.+ LTS to 9.9
1.0.+ SonarQube 9.4.+ LTS to 9.9
1.1.+ SonarQube 9.4.+ LTS to 9.9
1.2.+ SonarQube 9.4.+ LTS to 10.0

☕ Plugin Java part compatibility

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

They supported the project :

Links

ecocode's People

Contributors

aghilesazzoug avatar ahmedcove1 avatar alexishillion avatar antoinemeheut avatar cychop avatar dedece35 avatar eoenedis avatar funixg avatar glalloue avatar hiba99git avatar jb-ginguene avatar jbureau92 avatar jhertout avatar jules-delecour-dav avatar jycr avatar linkinfoxco avatar lsdla avatar med-s avatar mp-aubay avatar natixis-caen avatar nicolasdaviet avatar obeone avatar olegoaer avatar oussamalaribi avatar progear974 avatar silicoman avatar troulet avatar usfalami avatar utarwyn avatar vcagnard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.