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

Introduce InputOptionsSerializer #77

Merged

Conversation

theofidry
Copy link
Collaborator

In #28, the feature to forward the command options was introduced. It had to later be followed up by #41, #42 in order to fix the issue where the option value may require quoting. This piece of code is heavily under-tested (and it was really hard to test it as is) and is prone to bugs (I found 2 adding tests).

In this PR, I'm extracting this element into InputOptionsSerializer as a closed piece (static & final) as IMO there is no need to make it extensible: if broken it needs to be fixed. This extraction allows much easier testing.

This PR also fixes:

  • the case of negatable options
  • detection quoting with may fail to detect some special characters

@theofidry theofidry merged commit 1c758c0 into webmozarts:master Sep 30, 2022
@theofidry theofidry deleted the feature/input-option-serializer branch September 30, 2022 21:39
@theofidry theofidry mentioned this pull request Sep 30, 2022
theofidry added a commit that referenced this pull request Sep 30, 2022
Those methods have been moved to `InputOptionsSerializer` as part of #77.
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