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

Prevent file modification if formatter runs into an error #34

Open
Ashwin-Hariharan0 opened this issue Nov 11, 2024 · 3 comments
Open

Comments

@Ashwin-Hariharan0
Copy link

Ashwin-Hariharan0 commented Nov 11, 2024

When -w argument is used and formatter runs into "token recognition error", the .mo file is incorrectly modified. Could the formatter behavior be changed so that .mo file is overwritten only if there are no errors encountered (and leave modelica files which contain unrecognized tokens untouched)?

image

@tpwo
Copy link
Contributor

tpwo commented Nov 11, 2024

I see you have a fresh account, so you might not know that overusing @ to mention people on GitHub is a misbehavior. All people currently involved in the development should receive notifications anyway.

I'm not this kind of person, and I haven't used the Modelica language for over two years at this point, not mentioning this formatter.

I'm not sure if this project is still maintained. At the same time, I know that my former colleague created an alternative Modelica formatter which you may consider: https://github.com/ErykMroczek/mofmt

Note that I don't know which one is better or if there are any differences in offered features.

@Ashwin-Hariharan0
Copy link
Author

My apologies Tomasz, I'll remove the @ mentions (I wasn't sure if this repo was being actively tracked, so added a few people from the parent org).

Thank you for your recommendation of the alternative formatter, I will test it out.

@nllong
Copy link
Member

nllong commented Nov 12, 2024

We still use and develop this formatter and have not seen this error, can you share your .mo file that you are trying to format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants