package ocamlformat

  1. Overview
  2. Docs
Auto-formatter for OCaml code

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocamlformat-0.25.1.tbz
sha256=dc8f2a330ca3930b36cacb2623bb360ed8bdf6e4a8acd293dbd9e2241a6fd33d
sha512=b28f545425fb5375447c90022d065dc7fd51ed2f66d8c1f65a71a6ad2465d039a8686e8f18249e5ad3a2362fee6149c855ef30eb45fb9d06d743a53d26b3e26f

Description

OCamlFormat is a tool to automatically format OCaml code in a uniform style.

Published: 06 Mar 2023

README

Build Status

๐ŸŽจ ocamlformat

ocamlformat is a tool for formatting OCaml code. It automatically adjusts the layout of your code to follow the recommended style guidelines, making it easier to read and understand.

๐Ÿš€ Installation

To use ocamlformat, you will need to have OCaml and opam (the OCaml package manager) installed on your system.

Once you have these dependencies, installation is a breeze! Just run the following command:

opam install ocamlformat

๐Ÿ’ป Usage

Formatting your code with ocamlformat is super simple! Just run the following command:

ocamlformat file.ml

You can also specify a configuration file to customize the formatting behavior of ocamlformat. To set up your project to use the default profile and the ocamlformat version you installed let's create a configuration file named .ocamlformat containing:

profile = default
version = 0.25.1

For more information on configuration options, check out the documentation or run ocamlformat --help.

The most convenient way to format your code is through the dune build system. Just run the following command:

dune fmt

๐Ÿค Contributing

We welcome contributions to ocamlformat! If you find a bug or want to suggest a feature, please open an issue on the GitHub repository. If you want to contribute code, please follow the contributing guidelines and open a pull request.

๐Ÿ“œ License

ocamlformat is released under the MIT License.

Dependencies (5)

  1. re >= "1.10.3"
  2. ocamlformat-lib = version
  3. dune >= "2.8"
  4. cmdliner >= "1.1.0"
  5. ocaml >= "4.08" & < "5.2"

Dev Dependencies (3)

  1. odoc with-doc
  2. ocp-indent with-test & < "1.9.0"
  3. ocamlformat-rpc-lib with-test & = version

Used by (79)

  1. ask
  2. ask-integrator
  3. autofonce
  4. autofonce_config
  5. autofonce_core
  6. autofonce_lib
  7. autofonce_m4
  8. autofonce_misc
  9. autofonce_patch
  10. autofonce_share
  11. awsm-codegen
  12. bastet < "2.0.0"
  13. beluga >= "1.1"
  14. bitpack_serializer
  15. brisk-reconciler
  16. CamelCase
  17. canary >= "0.0.4"
  18. diff
  19. diskuvbox < "0.2.0"
  20. dream-inertia
  21. drom
  22. drom_lib
  23. drom_toml
  24. dump_ocamlformat
  25. dune_deps_extra
  26. ez_cmdliner >= "0.2.0"
  27. ez_config >= "0.2.0"
  28. ez_file >= "0.2.0"
  29. ez_hash < "0.5.3"
  30. ez_opam_file
  31. ez_search
  32. ez_subst
  33. fromager
  34. guardian < "0.1.0"
  35. header-check
  36. js_of_ocaml-webgpu >= "0.2"
  37. letters >= "0.2.0" & != "0.3.1"
  38. melange-fest
  39. melange-fetch >= "0.2.0"
  40. melange-json >= "1.2.0" & < "2.0.0"
  41. melange-radix-icons >= "0.1.0"
  42. mlx
  43. module-graph
  44. noCanren >= "0.3.0~alpha1"
  45. ocaml-lsp-server < "1.9.0"
  46. ocamlmerlin-mlx >= "0.11"
  47. ocp-search
  48. ocplib_stuff >= "0.3.0"
  49. oktree
  50. opam-bin >= "0.9.5"
  51. opam_bin_lib >= "0.9.5"
  52. owi >= "0.2"
  53. polars
  54. polars_async
  55. ppx_deriving_jsonschema
  56. prelude >= "0.4"
  57. primavera
  58. psmt2-frontend >= "0.3.0"
  59. query-json
  60. quickjs >= "0.2.0"
  61. rea < "0.2.0"
  62. react-rules-of-hooks-ppx
  63. red-black-tree
  64. scope
  65. sihl < "0.1.0"
  66. smtml >= "0.10.0"
  67. solidity-alcotest
  68. solidity-common
  69. solidity-parser
  70. solidity-test
  71. solidity-typechecker
  72. spectrum >= "0.7.0"
  73. styled-ppx
  74. synchronizer
  75. tdigest >= "2.2.1"
  76. tezt = "4.1.0"
  77. virtfs
  78. yocaml >= "2.0.0"
  79. zanuda < "1.1.0"

Conflicts

None