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

Parameters: fix flatten function for false parameters #108

Merged
merged 4 commits into from
Oct 7, 2018

Conversation

djbe
Copy link
Member

@djbe djbe commented Oct 7, 2018

@djbe djbe added this to the 2.7.2 milestone Oct 7, 2018
Copy link
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk, shouldn't it be the responsibility of the template and Stencil to evaluate the parameter with value "false" to false instead?

@djbe
Copy link
Member Author

djbe commented Oct 7, 2018

This is unrelated to the templates. It has to do with our swiftgen config lint command.


let otherFlag = Parameters.flatten(dictionary: ["test": "a"])
XCTAssertEqual(otherFlag, ["test=a"], "Non-boolean flag is flattened to a parameter with value")
}
Copy link
Contributor

@AliSoftware AliSoftware Oct 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add tests that Parameters.flatten(dictionary: ["test": "false"]) still passes the string "false" along (to check that we still make the distinction between false the Boolean and "false" the string?)

@djbe djbe force-pushed the fix/parameters-flatten branch from 16edce5 to 6857076 Compare October 7, 2018 16:11
@djbe djbe merged commit 636bb48 into master Oct 7, 2018
@djbe djbe deleted the fix/parameters-flatten branch October 7, 2018 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants