-
Notifications
You must be signed in to change notification settings - Fork 23
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 explicit return to JuliaFormatter and docs #953
Conversation
I'm not sure all the files should be changed with adding 'return.' |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #953 +/- ##
==========================================
+ Coverage 94.94% 94.99% +0.05%
==========================================
Files 29 29
Lines 1068 1079 +11
==========================================
+ Hits 1014 1025 +11
Misses 54 54 ☔ View full report in Codecov by Sentry. |
docs/src/91-developer.md
Outdated
@@ -198,6 +198,7 @@ We will try to follow these during development and reviews. | |||
- List obvious objects, e.g., `using JuMP: @variable`, since `@variable` is obviously from JuMP in this context, or `using Graph: SimpleDiGraph`, because it's a constructor with an obvious name. | |||
- For other objects inside `Package`, use `using Package: Package` and explicitly call `Package.A` to use it, e.g., `DataFrames.groupby`. | |||
- List all `using` in <src/TulipaEnergyModel.jl>. | |||
- Explicitly state what a function will `return`, including `return nothing`. |
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.
- Explicitly state what a function will `return`, including `return nothing`. | |
- Explicitly state what a function will `return`, including `return nothing`. |
Indeed, many places will be changed with this new rule because all functions return something (implicit rule is to return the last thing in a function). This is annoying, but necessary with this change. For most places, we are going to need manual intervention to add and empty |
@abelsiqueira I fixed a lot of them, but the rest I'm not sure if it was an implicit return or returning nothing. |
b5d844b
to
5a74eb2
Compare
Dangit I dunno why the conflict merger never works for me. I must be skipping a step. -_- |
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.
Thanks for the update. I marked a few places, which are the most relevant. The files in utils/scripts
don't matter, because they won't be run again, so I haven't reviewed whether it should be an empty return or not.
When it's ready to be merged, please mark as ready to review, I'll approve, and we can try to merge at a moment that avoids conflicts (since it's changing a bunch of files)
Thanks! Yeah sorry for jumping in and creating conflicts. |
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.
Thanks for the updates. @datejada and I will merge it now, but we'll rebase your branch ourselves
bda068a
to
08ff4a8
Compare
Related issues
Closes #796
Closes #940
Checklist
I am following the contributing guidelines
Tests are passing
Lint workflow is passing
Docs were updated and workflow is passing