exercism / elixir-analyzer

GNU Affero General Public License v3.0
30 stars 32 forks source link

Handle def+rescue in assert_call #366

Closed angelikatyborska closed 1 year ago

angelikatyborska commented 1 year ago

This PR partially deals with https://github.com/exercism/elixir-analyzer/issues/350 by handling def and defp with rescue blocks in assert_call.

It doesn't deal with the fact that we used form do def foo()... in many places and those won't work with def+rescue. However, I don't think we should change that.

Instead, I think we should add a common check to all learning exercises that don't require any rescuing that warns students that using raising and rescuing errors for flow control is an antipattern and might result in other analyzer feedback being invalid.