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

Add formatter option to have explicit returns #796

Open
abelsiqueira opened this issue Sep 13, 2024 · 0 comments
Open

Add formatter option to have explicit returns #796

abelsiqueira opened this issue Sep 13, 2024 · 0 comments
Labels
good first issue Good for newcomers Type: improvement Better way of doing something Zone: setup/admin Technical stuff that makes it work

Comments

@abelsiqueira
Copy link
Member

What and Why

The following returns nothing implicitly:

function foo()
  dict = Dict()
  for x = 1:3
    dict[x] = x^2
  end
end

The correct version must have a return dict in the end. Since this is implicit, it's easy to miss. I recommend adding a formatter option to automatically add return.

Possible Drawbacks

No response

Related Issues

No response

@abelsiqueira abelsiqueira added the Type: improvement Better way of doing something label Sep 13, 2024
@datejada datejada added the Zone: setup/admin Technical stuff that makes it work label Sep 17, 2024
@clizbe clizbe added the good first issue Good for newcomers label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Type: improvement Better way of doing something Zone: setup/admin Technical stuff that makes it work
Projects
None yet
Development

No branches or pull requests

3 participants