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

add ocamlformat github action #7

Merged
merged 3 commits into from
Jul 3, 2024
Merged

add ocamlformat github action #7

merged 3 commits into from
Jul 3, 2024

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented Jul 2, 2024

expectation for this PR is to fail (since the code isn't ocamlformat-formatted).

//cc @PizieDust

@hannesm
Copy link
Contributor Author

hannesm commented Jul 2, 2024

So, this is my proposal. A GitHub action that potentially adds a commit with the autoformatted code. What do you think?

@PizieDust
Copy link
Collaborator

PizieDust commented Jul 2, 2024

So, this is my proposal. A GitHub action that potentially adds a commit with the autoformatted code. What do you think?

This will be amazing. Is the pipeline costly to run? If so, we can always just try to remember to run ocamlformat before pushing, else this is a really awesome idea to have the CI format and add a commit.

Will this run for each commit? Can we have it run only when we are merging something into the main branch?

@hannesm
Copy link
Contributor Author

hannesm commented Jul 3, 2024

It took 3 minutes. I think if you've your editor with ocamlformat, that's fine. But if not, don't worry, and the CI will take care of it.

@hannesm hannesm merged commit fe91177 into main Jul 3, 2024
1 check passed
@hannesm hannesm deleted the format branch July 3, 2024 07:45
@hannesm hannesm mentioned this pull request Jul 3, 2024
7 tasks
@PizieDust
Copy link
Collaborator

It took 3 minutes. I think if you've your editor with ocamlformat, that's fine. But if not, don't worry, and the CI will take care of it.

Okay great. I do have ocamlformat. I guess I just have to run ocamlformat --inplace before pushing

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

Successfully merging this pull request may close these issues.

2 participants