Skip to content

#1643 improve ux on syntax error#1856

Closed
satorus wants to merge 3 commits into
devonfw:mainfrom
satorus:feature/1643-improve-ux-on-syntax-error
Closed

#1643 improve ux on syntax error#1856
satorus wants to merge 3 commits into
devonfw:mainfrom
satorus:feature/1643-improve-ux-on-syntax-error

Conversation

@satorus
Copy link
Copy Markdown
Contributor

@satorus satorus commented Apr 27, 2026

This PR fixes #1643

Implemented changes:

  • Improved CLI error message for unknown options given for commandlet
  • Improved CLI error message for unknown property value given for commandlet property
  • Added additional fields on ValidationState and Property to carry option/poperty value parse errors upwards for centralized CLI error message creation
  • Added test cases for parsing of arguments and new error messages

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

Checklist for tool commandlets

Have you added a new «tool» as commandlet? There are the following additional checks:

  • The tool can be installed automatically (during setup via settings) or via the commandlet call
  • The tool is isolated in its IDEasy project, see Sandbox Principle
  • The new tool is added to the table of tools in LICENSE.asciidoc
  • The new commandlet is a command-wrapper for «tool»
  • Proper help texts for all supported languages are added here
  • The new commandlet installs potential dependencies automatically
  • The variables «TOOL»_VERSION and «TOOL»_EDITION are honored by your commandlet
  • The new commandlet is tested on all platforms it is available for or tested on all platforms that are in scope of the linked issue

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Apr 27, 2026

Coverage Report for CI Build 24984011544

Coverage increased (+0.08%) to 70.718%

Details

  • Coverage increased (+0.08%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 164 coverage regressions across 8 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

164 previously-covered lines in 8 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/context/AbstractIdeContext.java 88 66.15%
com/devonfw/tools/ide/property/Property.java 35 73.0%
com/devonfw/tools/ide/version/VersionIdentifier.java 23 81.12%
com/devonfw/tools/ide/property/BooleanProperty.java 7 58.0%
com/devonfw/tools/ide/property/CommandletProperty.java 6 69.23%
com/devonfw/tools/ide/property/ToolProperty.java 2 92.59%
com/devonfw/tools/ide/validation/ValidationState.java 2 95.65%
com/devonfw/tools/ide/version/VersionSegment.java 1 89.76%

Coverage Stats

Coverage Status
Relevant Lines: 15395
Covered Lines: 11348
Line Coverage: 73.71%
Relevant Branches: 6878
Covered Branches: 4403
Branch Coverage: 64.02%
Branches in Coverage %: Yes
Coverage Strength: 3.12 hits per line

💛 - Coveralls

@satorus satorus marked this pull request as ready for review April 27, 2026 08:04
@satorus satorus moved this from 🆕 New to Team Review in IDEasy board Apr 27, 2026
@satorus satorus changed the title Feature/1643 improve ux on syntax error #1643 improve ux on syntax error Apr 27, 2026
@satorus satorus self-assigned this Apr 27, 2026
@satorus satorus added enhancement New feature or request CLI IDEasy command-line-interface (parsing args, etc.) labels Apr 27, 2026
@satorus satorus added this to the release:2026.05.001 milestone Apr 27, 2026
satorus added 3 commits April 27, 2026 10:14
Add parseHint and errorHint Fields on ValidationState and Property to convey parse errors from lower levels to CLI output
@satorus satorus force-pushed the feature/1643-improve-ux-on-syntax-error branch from e38b725 to f59d7af Compare April 27, 2026 08:14
@satorus
Copy link
Copy Markdown
Contributor Author

satorus commented Apr 28, 2026

This Issue will be continued in the issue #1457 as there is a lot ov overlap/duplication in the tasks, so this PR is closed and will be partly included in #1858 .

@satorus satorus closed this Apr 28, 2026
@github-project-automation github-project-automation Bot moved this from Team Review to ✅ Done in IDEasy board Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI IDEasy command-line-interface (parsing args, etc.) enhancement New feature or request

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

improve UX on CLI syntax error

3 participants