jborgers/PMD-jPinpoint-rules

Feature Request: Add classification tags to the rules

Closed this issue · 3 comments

Rules currently have only 'jpinpoint-rules' as tag in Sonar.

As an eco interested user I want to be able to see which rules have an eco/ green effect. Also a classification for type of rule. For instance: performance, maintenance, green, eco, sustainable, save the planet, CPU resource, memory consumption, network/disk usage (to choose.)

Sonar uses tags which seems appropriate, you can select them with OR.

classification:
performance - maintenance - concurrency

Sub categories of performance:
green / eco-friendly / sustainable

Sub categories of green:
CPU
memory
I/O

Sonar has a doc page on the tags: https://docs.sonarsource.com/sonarqube/9.8/user-guide/rules/built-in-rule-tags/
Some others are used a lot on the actual rules in sonar, like: correctness, multi-threading.
I added these tags to classify the sonar way, especially:
performance, multi-threading, correctness, confusing, bad-practice, suspicious, unpredictable.
I added three of my own: resilience, deprecated and data-mix-up.
Note that they are overlapping

possible performance subcategories:

  • response-time/user-experience/usability
  • resource-usage/efficiency/green
  • stability (e.g. OOM/crash/hang risk)

For the sustainability interested user of the rules, we expected it is important to know: how can I get the most sustainable impact with the least effort.
So, first step is to label a rule with the amount of sustainability gained. It is very dependent on how it is used, e.g. 10 times in a transaction, or only once in life time of the app, so impossible to do this accurately based on only the code.
What we can do is different levels:
High, Medium and Low for impact
So, tags like:
sustainability-high, sustainability-medium, sustainability-low