Skip to content
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

Fix #575: Scope IParametersValidator to Object-Specific Parameters #595

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arturobernalg
Copy link

This PR fixes issue #575, where an IParametersValidator on a @ParametersDelegate object incorrectly saw all parameters, including those from the top-level object (e.g., --argtop alongside --arg1 and --arg2). The fix scopes validators to their respective object’s parameters, improving intuitiveness and enabling easier mutex group implementation, as noted by @ekpdt.

Changed the storage and application of IParametersValidator instances from a global Set to a Map keyed by object, ensuring validators only see their own object's parameters. This resolves the bug where validators on a @ParametersDelegate saw top-level parameters (e.g., --argtop), making mutex group implementation more intuitive. Updated addDescription and validateOptions accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant