Green Static Code Analysis
Static code analysis with the goal to reduce the environmental footprint of software at code level.
Tools
ecoCode
Source code: https://github.com/green-code-initiative/ecoCode
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.
Rules support matrix: https://github.com/green-code-initiative/ecoCode/blob/main/RULES.md
Decarbonizing Software with Free and Open Source Software: The ecoCode Project - HAL open science
In this paper, we introduce ecoCode, a SonarQube plugin able to highlight code structures that are smelly from an energy perspective. It is based on a curated list of energy code smells likely to impact negatively the battery lifespan of Android-powered devices. The ecoCode plugin enables analysis of any native Android project written in Java in order to enforce green code.
CAST
Website: https://learn.castsoftware.com/green-software
CAST automatically understands your source code and provides first-of-a-kind green software insights as well as sustainability recommendations.
π References
2023-11-28 Energy Code Smells - Energieverbauch von Java und Optimierung
Kann statische Code-Analyse den Code grΓΌner machen? | envite consulting Blog