-
Notifications
You must be signed in to change notification settings - Fork 319
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
Refactor CLI classes to package de.jplag.cli
#716
Conversation
CLI will not be published to maven central. As long as the arguments do not change, there should be no problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one question :)
Unfortunately, the |
I'm not sure whether the dynamic loading is never useful . Maybe that's something to discuss :) Since we provide the languages as services, we should also have an API to load them (I guess) |
I did not see a use case where this functionality would become necessary as the language to test has to be specified anyways, and currently providing the language loader only enables the bad pattern of using the language loader + language identifier constant for loading the language instead of directly instantiating only the required language. For this reason, I moved the language loader to the cli package, thus making it inaccessible for the Java API itself. |
Ok for me. |
@JanWittler I've pushed one commit for the coverage-report here as well because before that was some kind of "implicit magic". Now it's explicitly stated in the pom.xml of the CLI |
db205d0
to
7829154
Compare
endtoend-testing/src/test/java/de/jplag/endtoend/LanguageHelper.java
Outdated
Show resolved
Hide resolved
7829154
to
6a17524
Compare
6a17524
to
a51bf75
Compare
e46042c
to
165bb00
Compare
d216592
to
b5c0c2d
Compare
moved LanguageLoader into CLI as only required there
d189ddc
to
1379f60
Compare
Kudos, SonarCloud Quality Gate passed! |
Currently, the CLI classes are in the same package as the JPlag core, i.e.
de.jplag
. However, as they serve a different purpose, they should belong to a different package. Thus, this PR refactors all classes of the/cli
directory to be in packagede.jplag.cli
.Additionally, the
LanguageLoader
is moved to the CLI package, as it should never be used by the Java programmatic API. Instead, there the language should be imported and directly instantiated.