green-code-initiative / ecoCode

Reduce the environmental footprint of your software programs with SonarQube
https://ecocode.io
GNU General Public License v3.0
139 stars 76 forks source link

Rule specifications normalization #349

Open pbaumard opened 1 month ago

pbaumard commented 1 month ago
  1. Mainly ensures the Sonar guidelines for rule specifications are followed with tests. This should avoid most of the comments made by Sonar reviewers, e.g. in ecocode plugin request or ecocode js plugin request.
  2. Add Clean code attributes for all rules.
  3. Improved description wording with shorter sentences.
  4. Avoid mardown in asciidoc files to ease the use of asciidoc editors
dedece35 commented 1 month ago

pbaumard

Hi @pbaumard ,

thank you for this PR ... very interesting but a lot of modifications. Can you give us your reference documentation to prove or support your proposition ?

Furthermore, your build is not ok on github action ... please make a correction for it. In my local machine (Mac OS), when I launch your unit test, I have a different error :

[INFO] Running fr.greencodeinitiative.RulesTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.506 s <<< FAILURE! -- in fr.greencodeinitiative.RulesTest
[ERROR] fr.greencodeinitiative.RulesTest.testRules -- Time elapsed: 0.018 s <<< FAILURE!
org.opentest4j.AssertionFailedError: array contents differ at index [0], expected: <csharp> but was: <python>

please check it in your local machine.

Last question : why is your PR in Draft mode ? Do you still want to work on it ?

pbaumard commented 1 week ago

This PR is now ready for review.