ocaml / ocaml/dune

Autoformat generated files before diffing/promotion

Open
#2,992 14 comments 1 reaction 1 assignee View on GitHub

@NathanReb is already working on this.

Since Jan 7, 2020.

test
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

This could be done by adding an optional styler field to the stanza but I'm not sure that's the best solution here.

An alternative is to allow overwriting the action, just as with the test stanza but I'm not sure that's great either, that's what I attempted at first but I realized that while it wasn't allowed by dune I had no idea how it was invoked and what were the right set of dependencies.

It would be nice if it used ocamlformat by default if the project is already using it but I think it makes sense to allow to pass stylers even when that's not the case. Relying on an external formatter so that you don't have to bother with that in your code generating code is what's most important about this feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.