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

Formatter #23

Open
justinmchase opened this issue Nov 12, 2022 · 0 comments
Open

Formatter #23

justinmchase opened this issue Nov 12, 2022 · 0 comments
Milestone

Comments

@justinmchase
Copy link
Owner

justinmchase commented Nov 12, 2022

  • Opinionated, no formatting parameters available
  • Can be run in check mode, which makes no changes but emits errors if there are differences
  • Comments must be preserved
  • Reads any file, parses it to ast, re-generates code from that ast
    • in check mode, diff the two generate errors
    • in non-check mode write the formatted version back to disk

Its possible a generic formatter parser will need to be written which knows how to parse blocked code and pay attention to line endings and preserve comments. It would be a language agnostic formatter, not sure if thats actually possible or if we just need to make the full parser aware of whitespace and comments.

@justinmchase justinmchase added this to the MVP milestone Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant