Skip to content

Conversation

@lschuermann
Copy link

@lschuermann lschuermann commented Aug 16, 2025

Summary & Changes

Makes typstyle exit with an ExitStatus::Failure upon encountering a syntax error.

I am integrating it into my editor, and it was quite suprising to me seeing that typstyle will silently ignore erroneous input. This is different from other widespread formatting tools, such as rustfmt.

If there is a good reason to keep the original behavior, I'm happy to put this change behind a command line switch.

Checklist

Before submitting, please ensure you've done the following:

  • Updated CHANGELOG.md: Added your changes with examples to the changelog
  • Updated documentation: Updated relevant docs, examples, or README
  • Added tests: Added tests for new features or bug fixes

Testing

Needs testing.

Additional Notes

@QuadnucYard
Copy link
Collaborator

I had discussed with @Enter-tainer about this behavior offline long before. We believed that typstyle was not intended as a syntax checker, so erroneous input can be silently ignored.

Anyway, we can now reconsider the appropriate behavior.

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

Successfully merging this pull request may close these issues.

2 participants