-
Notifications
You must be signed in to change notification settings - Fork 12
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
Dune format #21
Dune format #21
Conversation
I was looking into writing a workflow for Auto formatting the code, but we already have one: https://github.com/ThinkOpenly/sail/blob/json/.github/workflows/formatting.yml, enabling this should do the trick. |
This commit keeps popping up unexpectedly:
Given the pervasive nature of the changes here, you might need to reset, rebase, rerun the reformat, and force push. Let me know if I can help. |
Yeah, I noticed. I forgot to rebase with the upstream. Will cleanup as soon as possible. |
@ThinkOpenly , I think this is ready, the formatting workflow ran smoothly (as evident in the checks below), and I've already rebased as well. Build workflow is failing, I'll look into it and provide a fix through a separate PR. |
It appears to be the same "Test Coverage" action that has failed before this PR, and failing in the same way. I'm asserting that this PR didn't introduce a new build failure, would you agree? |
Yes. But before this both the Test Coverage and Check formatting was failing. Formatting is fixed now. Yes. This PR didn't introduce a new build failure. It was happening before too. |
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.
Thanks for discovering this capability, and implementing!
I just finished creating a Formatter for Ocaml too! But then realised we already have one. |
I'm not sure how to answer your question. Are you observing behavior that is concerning? |
Format the json backend with
dune fmt
.dune fmt
essentially usesocamlformat
under the hood.ocamlformat
.Examples:
ocamlformat src/sail_json_backend/*.ml --inplace
--formats the whole json backend inplace. Use--check
to preview the changes first.