-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use OCamlformat? #6
Comments
My main concern about formatting tools in established projects is the loss of revision history. It becomes impossible to trace a line to a specific commit using So I wonder if history loss would be an acceptable price to pay for consistent indentation. There are also problems other than indentation now, such as chunks of commented-out code. Ideally "all good people of the world" should give that codebase a good review and clean-up. If we can get anyone else involved in that, it may be a good idea to run the code through the formatter before the clean-up project begins because so far most changes are attributed to either you, me, or two more people (@Drup and @Leonidas-from-XIV). |
Dune supports reformatting out of the box with That said, I understand @dmbaturin's concern. There is no good solution for this, but as a stopgap it is possible to ignore certail revs for |
Thanks for the comments. I understand @dmbaturin's concern as well. Given that the code doesn't see a lot of changes, I would argue that it is a good moment to do this, hoping to benefit from it in the future by making changes easier. Is |
Ho do you feel about re-indenting all code using OCamlformat and introducing a
make format
targe for this? I'm using it now on all my current projects and it has changed my opinion about indentation. Yes, you can emphasize meaning by using alignment that an automatic tool can't create but I think the advantages of consistent indentation outweigh this. In particular tricky cases (if
vs.match
) where indentation can become misleading after changes.The text was updated successfully, but these errors were encountered: