-
Notifications
You must be signed in to change notification settings - Fork 179
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
Isolate configuration files #393
Comments
related to #391 |
Yes, the current behavior of ocamlformat is the way it is just because it was a quick hack and I didn't know a good way to identify the root. Adding a command line option would be very clear, and work well in cases where it is called from something that knows the project root, but maybe would require too much interaction for the use case in #391. What do you think @hhugo, would just a |
providing a --root would probably work fine together with some logic in the editor mode. |
To recap I think that there are three use cases:
|
|
Closed with #402 |
Hello,
I am implementing an integration with dune (see ocaml/dune#1201).
If I understand it correctly, at the moment, the configuration is read in cascade from the closest
.ocamlformat
all the way up until a global.ocamlformat
file.In the context of dune, this can cause reproducibility problems, because in a dune project with no
.ocamlformat
file (or with a partial one), runningocamlformat
on a file will read each developer's global configuration file, and will cause different results.I'm not sure about the best technical solution, but a
--root
configuration option that never reads files above a particular directory seems enough. This option would also disable reading the global configuration file and from the environment as well.What do you think about this?
Thanks!
The text was updated successfully, but these errors were encountered: