-
Notifications
You must be signed in to change notification settings - Fork 65
Produce constructive warning if git repo url is not sane #742
Copy link
Copy link
Labels
createCreate commandlet used to create new IDEasy projects with "ide create"Create commandlet used to create new IDEasy projects with "ide create"documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestloggingIDEasy specific logging (levels, messages, etc.)IDEasy specific logging (levels, messages, etc.)
Milestone
Metadata
Metadata
Assignees
Labels
createCreate commandlet used to create new IDEasy projects with "ide create"Create commandlet used to create new IDEasy projects with "ide create"documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requestloggingIDEasy specific logging (levels, messages, etc.)IDEasy specific logging (levels, messages, etc.)
Type
Projects
Status
✅ Done
https://github.com/devonfw/IDEasy/blob/main/documentation/project.adoc explains how to
createa project with IDEasy.It seems to lack a description of the feature
--codethat allows to create a project from a code repo containing the settings.For some reason this is documented here:
https://github.com/devonfw/IDEasy/blob/main/documentation/settings.adoc#settings
So first observation is that our documentation is kind of redundant and inconsistent.
However, the actual point of this story is that users easily do things wrong on the project creation.
As a first step, we want to do the following:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/git/GitUrl.java
Line 51 in 7be183c
settingsand code repos should not do that. Therefore we will check if the repo name contains the sub-stringsettingsor not.--codeflag equal to the fact that we found thesettingssub-string. In that case we have a potential inconsistency and will log a warning.The warning should depend on the fact if the
--codeflag was present or not:Or if
--codewas not present:I would suggest to insert the new code for this story at the beginning of this method:
IDEasy/cli/src/main/java/com/devonfw/tools/ide/commandlet/CreateCommandlet.java
Line 98 in 7be183c
As a nice to have, you could also include a cleanup of the documentation inconsistency described above.
Otherwise feel free to create a github new issue for the documentation improvement if you want to keep your PR minimal.
Test
1+2 should work successfully.
3+4 are both non-sesne and should therefore produce the new warning.
Du kannst auch nach ausgabe der Warning