-
Notifications
You must be signed in to change notification settings - Fork 420
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 Credo.Check.Refactor.Apply #897
Conversation
test "it should report a violation for apply/2" do | ||
""" | ||
defmodule Test do | ||
def some_function(fun, arg1, arg2) do | ||
apply(fun, [arg1, arg2]) | ||
def some_function(arg1, arg2) do | ||
apply(:fun_name, [arg1, arg2]) |
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.
Why do we need to update this particular test in a PR fixing #892?
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.
The new test above replaced these tests, and this test is now one of the two tests for testing that the check reports a violation. The check reports now just a violation when fun_name
is an atom
and args
is a list
. The mentioned test is testing this now for apply/2
.
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.
But there is no longer a test ensuring that apply/2
works with a variable given for the fun name? Or am I missing something?
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, now I see. I will add some more tests for apply/2
.
@NickNeck Thx! 👍 |
closes #892