You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just an idea - it would be nice to make elvis warn about the situations when variable is exposed from the scope without doing that explicitly, like this:
case some_function() of
opt1 ->
... some code here ...
Var = some_other_fun()
... some code here as well ..
opt2 ->
... some code here ...
Var = some_other_fun2()
... some code here as well ...
end,
other_function(Var)
Where the good code imho would do smth like:
{Var, Rest...} = case some_function() of
opt1 ->
... some code here ...
V = some_other_fun()
... some code here as well ..
{V, R...}
opt2 ->
... some code here ...
V = some_other_fun2()
... some code here as well ...
{V, R...}
end,
other_function(Var)
The text was updated successfully, but these errors were encountered:
Just an idea - it would be nice to make elvis warn about the situations when variable is exposed from the scope without doing that explicitly, like this:
Where the good code imho would do smth like:
The text was updated successfully, but these errors were encountered: