#1457: Improve CLI error messages with suggestions#1858
Open
KarimALotfy wants to merge 11 commits into
Open
Conversation
- Add clearer messages when a command requires IDEasy project context. - Detect unknown options and suggest the closest valid option (Did you mean ...). - Suggest closest commandlet name for unknown commands. - Add tests for the new suggestion flows
Collaborator
Coverage Report for CI Build 26276726360Coverage increased (+0.1%) to 71.188%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions238 previously-covered lines in 5 files lost coverage.
Coverage Stats💛 - Coveralls |
…nvalid-args-or-commandlets
…nvalid-args-or-commandlets
15 tasks
-Added Error handling for Invalid Arguments -Added in ClI Error the installable Versions as a suggestion when an unfound version is entered
…-invalid-args-or-commandlets"
…-or-commandlets' of https://github.com/KarimALotfy/IDEasy into feature/1457-improve-CLI-error-messages-on-invalid-args-or-commandlets
MarvMa
approved these changes
May 6, 2026
Contributor
MarvMa
left a comment
There was a problem hiding this comment.
Nice Work! This will help users in the future to understand incorrect inputs better and even get a recommendation. I tested the functionality on Windows using the following tests:
- delete settings file -> run
ide update-> the expected warning is beeing printed - run
ide udpate-> a suggestion is beeing printed
I left some comments regarding the naming of boolean methods and a comment on a nested if else clause. Except that everything looks fine to me 🚀
- Refactored methods in CliSuggester to match coding-conventions - Improved readability in run method in AbstractIdeContext by reducing nested code - Change in CHANGELOG.adoc
…r-messages-on-invalid-args-or-commandlets"
…nvalid-args-or-commandlets
MarvMa
reviewed
May 12, 2026
Contributor
MarvMa
left a comment
There was a problem hiding this comment.
Looks really clean, Nice Job 💯
…nvalid-args-or-commandlets
…nvalid-args-or-commandlets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve CLI error messages with suggestions
This PR fixes #1457
Implemented changes:
(Reused from PR : "#1643 improve ux on syntax error #1856" of improve UX on CLI syntax error #1643 by @satorus )
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal