green-code-initiative / ecoCode-android

Reduce the environmental footprint of your Java-based Android apps with SonarQube
https://ecocode.io
GNU General Public License v3.0
58 stars 18 forks source link

Add ecoCode-android plugin to SonarQube Marketplace #67

Closed jycr closed 12 months ago

jycr commented 1 year ago

(I'm creating this issue to track activity regarding this plugin deployment target on SonarQube Marketplace. You can assign this issue to me.)

In the same way as what had been done for the non-mobile plugins (green-code-initiative/ecoCode#63), this plugin should be published on the SonarQube Marketplace.

TODO List:

More information:

dedece35 commented 1 year ago

Hi @jycr, thank you for issue. plop @glalloue @olegoaer @jhertout

jhertout commented 1 year ago

Hi, for the rule naming convention, do we begin at a very high number, such as 10000 to simplify the management with the ecoCode repo and avoid conflict? Our first rule will be EC10001 for example?

What do you think @olegoaer, @jycr, @dedece35?

jycr commented 1 year ago

Hi, for the rule naming convention, do we begin at a very high number, such as 10000 to simplify the management with the ecoCode repo and avoid conflict? Our first rule will be EC10001 for example?

What do you think @olegoaer, @jycr, @dedece35?

Oops, I've already started refactoring for Android rules starting numbering at EC500 and for iOS rules at EC600.

jycr commented 1 year ago

I have found common "legacy keys" for Android and iOS :

There are same keys, but not same description. For example:

For EIDL001 on iOS

{
  "key": "EIDL001",
  "name": "Idle timer disabled",
  "severity": "MAJOR",
  "description": "Do not disable idle timer, unless absolutely necessary.",
  "debt": {"function": "CONSTANT_ISSUE", "offset": "5min"},
  "tags": ["ecocode", "environment", "sobriety", "eco-design"],
  "type": "CODE_SMELL"
}

For EIDL001 on Android

{
  "title": "Idleness: Keep Screen On (addFlags)",
  "type": "CODE_SMELL",
  "status": "ready",
  "remediation": {"func": "Constant/Issue", "constantCost": "20min"},
  "tags": ["idleness", "environment", "ecocode", "android"],
  "defaultSeverity": "Major"
}

So, we must not use same new "ECxxxx" keys? You agree?

jhertout commented 1 year ago

Hi, for the rule naming convention, do we begin at a very high number, such as 10000 to simplify the management with the ecoCode repo and avoid conflict? Our first rule will be EC10001 for example? What do you think @olegoaer, @jycr, @dedece35?

Oops, I've already started refactoring for Android rules starting numbering at EC500 and for iOS rules at EC600.

Is it easy for you to start at EC10000 and EC20000? I think it is possible that someday we will have 100 rules and if for a reason or an other we have to drop numbers, it will be easier. In which project do you start refactoring? The documentation? I was planning to start doing it on ecoCode-Android.

Thanks

jhertout commented 1 year ago

I have found common "legacy keys" for Android and iOS :

  • EIDL001
  • EIDL002
  • EPOW002
  • ESOB001
  • ESOB002
  • ESOB003
  • ESOB005
  • ESOB006

There are same keys, but not same description. For example:

For EIDL001 on iOS

{
  "key": "EIDL001",
  "name": "Idle timer disabled",
  "severity": "MAJOR",
  "description": "Do not disable idle timer, unless absolutely necessary.",
  "debt": {"function": "CONSTANT_ISSUE", "offset": "5min"},
  "tags": ["ecocode", "environment", "sobriety", "eco-design"],
  "type": "CODE_SMELL"
}

For EIDL001 on Android

{
  "title": "Idleness: Keep Screen On (addFlags)",
  "type": "CODE_SMELL",
  "status": "ready",
  "remediation": {"func": "Constant/Issue", "constantCost": "20min"},
  "tags": ["idleness", "environment", "ecocode", "android"],
  "defaultSeverity": "Major"
}

So, we must not use same new "ECxxxx" keys? You agree?

Yes it is an error, we must not use same new "ECxxxx" keys.

jhertout commented 12 months ago

The plugin was accepted on SonarQube market place : https://community.sonarsource.com/t/new-plugin-ecocode-android-requesting-inclusion-in-sonarqube-marketplace/104674. I close this issue.