-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
feat(grainfmt): Allow directory input & output #1274
Conversation
feat(grainfmt)!: Replace `--in-place` flag with `-o` flag chore(grainfmt)!: Remove stdin formatting support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! The new LSP formatter doesn’t need stdin as you say so happy to see that go for directory support instead.
regex format looks good too
@phated Should this be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good (though see earlier comment), but on the squash can you make sure there is some mention of reformatting Regex, since this will touch the git blame
for most of that file?
The specific breaking changes are marked as breaking, so they will show up. All will be included in the squash.
Will do! |
Closes #973
This adds directory input & output support for grain format. The implementation is very close to the graindoc implementation and they can probably be consolidated in the future.
The big breaking changes to support this are:
--in-place
flag. Instead, you need to specify the same file as the "output", e.g.grain format test.gr -o test.gr
I ran the directory formatting against the stdlib and the only unformatted file was Regex. So I suggest y'all review that file to look for complaints/bugs with the formatter (and we'll probably want to file those separately).