Skip to content

Option position may break required error #601

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

Closed
jvalkeal opened this issue Jan 6, 2023 · 0 comments
Closed

Option position may break required error #601

jvalkeal opened this issue Jan 6, 2023 · 0 comments
Assignees
Labels
branch/2.1.x Issue for a branch for/backport For backporting type/bug Is a bug report
Milestone

Comments

@jvalkeal
Copy link
Contributor

jvalkeal commented Jan 6, 2023

CommandParser will do its things with existing options.

At some point options are filtered and sorted by position and as options from annotations already know their position positions(while programmatic registration may not) required options may get removed from parser internal list, thus may cause some errors not getting reported.

@jvalkeal jvalkeal added type/bug Is a bug report for/backport For backporting branch/2.1.x Issue for a branch labels Jan 6, 2023
@jvalkeal jvalkeal added this to the 3.0.0-RC1 milestone Jan 6, 2023
@jvalkeal jvalkeal self-assigned this Jan 6, 2023
jvalkeal added a commit that referenced this issue Jan 7, 2023
- This commit modifies CommandParser to better track positional parameters
  which previously used to go there for non-recognised options. Now using
  relatively dump logic of just checking if first positional parameter starts
  with '-' which indicates it's a candidate for a new `UnrecognisedOptionException`
  which then would give user an error "Unrecognised option '--xxx'" for example.
- Backport #601
- Backport #602
- Fixes #603
- Fixes #604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/2.1.x Issue for a branch for/backport For backporting type/bug Is a bug report
Projects
None yet
Development

No branches or pull requests

1 participant