-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add UnusedPipeVariableLinter #459
Conversation
There is already an issue tracking this 😉. |
Two of the test suites are failing because they could not run hhvm and two are failing with this error:
This seems like an unrelated |
Yes, I ran into that too. You can add a 6c00e36 is the diff you can apply. |
Retrigger the CI |
Retriggered CI again to get the build to pass on macOS. I think this PR is now ready for review/discussion. |
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.
Looks good to me
This PR introduces
UnusedPipeVariableLinter
to identify bugs where the pipe variable$$
is missing from a pipe operation.I recently encountered a bug in a pipe operation where the right-hand side re-used the initial variable, discarding the intended input in
$$
:Note that the docs for "Expressions And Operators: Pipe" say:
If it's a bug that the typechecker does not produce an error for a missing
$$
, we can close this PR and file an issue in https://github.com/facebook/hhvm.