Add measures to help drive software climatic impacts

IT has a huge impact on climate and is responsible for part of the changes to come. Using and developing programs that restrict their impacts on the climate should be the norm and development teams should be urged to use practices, tools and designs that help in offering such virtuous software: “low carbon impact” should be considered as a great quality criterion.

SQ is a great tool to monitor software quality and as such it should offer the ability for development teams to track and follow the carbon impact of their work. The request is to add measures in SQ that people can feed and use to monitor the carbon impact of their programs. We already have some simple metrics that we could use to feed these measures: Web page weight, number and average weight of the requests between the front-end and back-end, etc.

It is not an easy task to feed such measures: additional plugins shall be created in this purpose, but SQ should be ready for this and offer the opportunity to take an active role in the uttermost goal that is coping the climate change.


thanks for raising this topic, you can’t imagine how happy I am to see people care about the climate. :slight_smile:

To me, SonarQube (at least in its current form) can’t be the tool for those needs. SonarQube is strictly source-code centric, it’s all about source code static analysis and it is designed to report problems found on lines of code during automated CI/CD processes. The metrics you started listed can not be managed by SonarQube:

  • the weight of a Web page cannot be linked to a source file (it’s a combination of many files)
  • the requests between the front-end and back-end can hardly be gathered during a CI/CD workflow

I know a company who’s jumped into this topic: It’s a really specific domain on its own.

On SonarSource side, the “only” thing we could do (and that could already be great!) would be do find what kind of issues we could find during static code analysis, that we could correlate to reducing the environmental footprint of a code base.



I understand your point of view. My first intention what to “lancer un pavé dans la mare” to see if people are caring about IT’s environmental impacts :wink:

I know it is very hard to find issues that could correlate to an environmental footprint. So far my guessing is that environmental metrics mostly come from dynamic tests but still there are some static metrics we can use. As an example I can mention dependency management: if you are able to measure and compare a dependency’s impacts then you can identify an issue for applications using the less performing version of a framework.

Consequently, I do not really request new metrics but instead at the moment have the ability to define our own metrics and/or measures that we could feed with some specific or custom plugins. Maybe it is already possible but allowing plugins to define new measures, which we could use in quality gates, would be great because people could develop their own custom plugins with whatever they think could measure an environmental impact and assess their developments against that.

Don’t know if I’m clear.