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

Look through NoParenthesesStrict for parameters #410

Merged
merged 2 commits into from Sep 5, 2016
Merged

Look through NoParenthesesStrict for parameters #410

merged 2 commits into from Sep 5, 2016

Conversation

KronicDeth
Copy link
Owner

Fixes #367

Changelog

Enhancements

  • Include element class in Callable logged errors because sometimes, the excerpt doesn't have enough context, and it's not safe to search for more context (as those PSI walking methods have also had errors before), so include the element class in the message, which has the benefit that most times the bugs are fixed by adding that class or an interface of that class to one of the methods AND it will make the error message different, so that users don't think other users have the same error and jump on the issue instead of opening a new one.

Bug Fixes

  • ElixirNoParenthesesStrict can occur in def (conn, %{}) do\nend when a template is used, so there is no name for def. Since the intent is known, mark conn as a parameter by checking the parent of the ElixirNoParenthesesStrict, which eventually gets to the def.

Sometimes, the excerpt doesn't have enough context, and it's not safe to
search for more context (as those PSI walking methods have also had
errors before), so include the element class in the message, which has
the benefit that most times the bugs are fixed by adding that class or
an interface of that class to one of the methods AND it will make the
error message different, so that users don't think other users have the
same error and jump on the issue instead of opening a new one.
`ElixirNoParenthesesStrict` can occur in `def (conn, %{}) do\nend` when a
template is used, so there is no name for `def`.  Since the intent is
known, mark `conn` as a parameter by checking the parent of the
`ElixirNoParenthesesStrict`, which eventually gets to the `def`.
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.

Don't know how to check if parameter in [id]
1 participant