-
Notifications
You must be signed in to change notification settings - Fork 58
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
Compile filters in call node #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the linter violation to fix, could be nice to update the tag's doc as we're at it to add an example using one or multiple arguments using filter expression(s) to show in the doc that it's now possible 😉
@@ -38,7 +38,8 @@ class CallNodeTests: XCTestCase { | |||
} | |||
|
|||
XCTAssertEqual(node.variableName, "myFunc") | |||
XCTAssertEqual(node.arguments, [Variable("a"), Variable("b"), Variable("c")]) | |||
let variables = node.arguments.flatMap({ $0 as? FilterExpression }).flatMap({ $0.variable }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally agree with this code style too when chaining flatMaps but our linter disagrees there, so maybe adapt the syntax here, like let variables = node.arguments.flatMap { ($0 as? FilterExpression)?.variable }
?
|
@AliSoftware which one? I don't see errors or warnings in the lint logs |
@ilyapuchka Nvm, false alarm, my bad. The story is that I looked at the CircleCI report from my iPhone, but since CircleCI isn't really responsive and doesn't display the logs in a super-adapted way on mobile, I got confused by the console logs. The console writes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CHANGELOG.md
Outdated
|
||
### Bug fixes | ||
|
||
* Fixed using filter expression in call node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, just missed that remark though:
Missing two spaces at the end of the line after the .
— for markdown formatting purposes
(we should def add a Dangerfile and rule for linting our CHANGELOG one day, just never had time to write one for our specific CHANGELOG formatting convention yet)
CHANGELOG.md
Outdated
@@ -6,7 +6,7 @@ | |||
|
|||
### Bug fixes | |||
|
|||
* Fixed using filter expression in call node. | |||
* Fixed using filter expression in call node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Resolves #76