-
Notifications
You must be signed in to change notification settings - Fork 71
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
Glitchy nested end
for sciml
style
#604
Comments
it looks like the |
It's because of https://github.com/SciML/SciMLStyle#tests-and-continuous-integration . It's applied generally. |
Is there a way to toggle that particular option in the configuration file? |
Bump on this. Is https://github.com/domluna/JuliaFormatter.jl/blob/master/src/styles/sciml/pretty.jl#L93-L120 responsible for unconditionally applying this formatting? If so, having an option to disable it and use the default |
I think it might be. I have to take another look at this, macros are tricky, maybe #669 can be dealt with at the same time |
so it's indeed because of https://github.com/domluna/JuliaFormatter.jl/blob/master/src/styles/sciml/pretty.jl#L93-L120 Is this intentional then? How should we proceed @YingboMa @ToucheSir toggling this isn't exactly what options are designed for. Can we adjust this so that if it's a macrocall then it is intended and placed on a new line? |
so changing line 103 to
|
ok #673 this seems sufficient no? |
If I understand the rule correctly, this is something that depends on line length as well? I don't understand the test in #673 well enough to know whether that's the globally desirable behaviour, but if the example in the OP is fixed then that looks good to me. |
this block forces line length to explicitly not be considered. The wording in the doc Yingbo linked and the comment he wrote initially in the above code implies it's more so about having a singular expression/statement vs. length |
@YingboMa does this look reasonable? |
the original example becomes
|
is this fine to merge SciML people? |
That looks fine. |
In using the formatter for Metalhead.jl (FluxML/Metalhead.jl#163) with the
sciml
style, it seems to somehow want to keep the final twoend
s on the same line for testsets with afor
. An example is given below:The text was updated successfully, but these errors were encountered: