[OCaml] Generate .ocamlformat file; format all generated OCaml files#21809
Conversation
|
@wing328 I gave it a shot, and tried to format the generated files + check that in CI. What do you suggest? |
that's expected. the same applies to other client samples that we previously tried to auto-format the code. so no need to commit the auto-format code the .ocamlformat file should make it easier for users to format the code if needed (some users simply don't care about the code format as long as the auto-generated ocam client is functional) |
|
Got it, I reversed those changes. BTW I can be added to the OCaml technical committee if you wish, I have a basic understanding of how the pieces move for the OCaml generator now. |
yes, please thanks for joining us to help move this project forward |
|
Done in e5a205a in this MR |
…penAPITools#21809) * [OCaml] Generate .ocamlformat file Fixes OpenAPITools#21806 * [OCaml] Run `dune fmt` on all OCaml folders * Don't format in Git * Add myself for OCaml
Fixes #21806
I checked that CI correctly fails if the generated code is not formatted, see https://github.com/OpenAPITools/openapi-generator/actions/runs/17209423214/job/48817282401?pr=21809
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)