Skip to content

Improve structure and content of the examples Java sources #56

Open
@pataluc

Description

@pataluc

Example source code for running tests located here: https://github.com/green-code-initiative/ecoCode-java/tree/main/src/test/files and copied (more or less) here: https://github.com/green-code-initiative/ecoCode-java-test-project/tree/main/src/main/java/fr/greencodeinitiative/java/checks could be vastly improved.

Problems:

  • Files should probably be identical in both location, but are not (some have Licence in javadoc, some are under a java package, ...).
  • Example source does not mentionned rule key, therefore it's often difficult to determine which serve to test which rule
  • Example source often raise sonar issues that are not related to the one that is currently being tested: adds some noise to the tests

Suggestion:

  • Find a way to store example source code once: by using git submodule maybe, or another mecanism.
  • Correct use of the java packages, to tidy things up by adding a reference to the rule key:
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions