Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve structure and content of the examples Java sources #56

Open
pataluc opened this issue May 30, 2024 · 0 comments
Open

Improve structure and content of the examples Java sources #56

pataluc opened this issue May 30, 2024 · 0 comments

Comments

@pataluc
Copy link

pataluc commented May 30, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant