-
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
Syntax change in macro call produces erroneous code. #669
Comments
I guess disabling this transform in a macro block is what we should do. |
can you post the format arguments so I can easily reproduce it |
The formatter arguments are specified by this toml file |
ok so I have a solution for this but it would apply to all macro block calls so the following would also not turn into a long form function.
A way to workaround this is to have a list of macros which are known to be "fine" with this sort of thing. So thoughts @baggepinnen |
would also have to add a case for the opposite. Not sure what other transform is problematic. |
JuliaFormatter does not understand the
@variables
macro from ModelingToolkit, when formatting, it tries to change the syntax appearing herefrom short to long function definition:
This produces incorrect code. Perhaps JuliaFormatter should be more careful with reformatting macro calls since they may expect a certain syntax, and the alternative syntax after formatting may be invalid.
The text was updated successfully, but these errors were encountered: