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 (4)

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

Used by (84)

  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. ephemeral
  27. ez_cmdliner >= "0.2.0"
  28. ez_config >= "0.2.0"
  29. ez_file >= "0.2.0"
  30. ez_hash < "0.5.3"
  31. ez_opam_file
  32. ez_search
  33. ez_subst
  34. fromager
  35. guardian != "0.1.0"
  36. header-check
  37. js_of_ocaml-webgpu >= "0.2"
  38. letters >= "0.2.0" & != "0.3.1"
  39. lunar
  40. melange-fest
  41. melange-fetch >= "0.2.0"
  42. melange-json >= "1.2.0" & < "2.0.0"
  43. melange-radix-icons >= "0.1.0"
  44. melange-str
  45. mlx
  46. module-graph
  47. noCanren
  48. ocaml-lsp-server < "1.9.0"
  49. ocamlmerlin-mlx >= "0.11"
  50. ocp-search
  51. ocplib_stuff >= "0.3.0"
  52. oktree
  53. opam-bin >= "0.9.5"
  54. opam_bin_lib >= "0.9.5"
  55. owi >= "0.2"
  56. pgn_to_tex
  57. polars
  58. polars_async
  59. ppx_deriving_jsonschema < "0.0.7"
  60. prelude >= "0.4"
  61. primavera
  62. psmt2-frontend >= "0.3.0"
  63. query-json
  64. quickjs >= "0.2.0"
  65. rea < "0.2.0"
  66. react-rules-of-hooks-ppx
  67. red-black-tree
  68. scope
  69. sihl < "0.1.0"
  70. slugline
  71. smtml >= "0.10.0" & < "0.24.0"
  72. solidity-alcotest
  73. solidity-common
  74. solidity-parser
  75. solidity-test
  76. solidity-typechecker
  77. spectrum >= "0.7.0"
  78. styled-ppx
  79. synchronizer
  80. tdigest >= "2.2.1"
  81. tezt = "4.1.0"
  82. virtfs
  83. yocaml >= "2.0.0"
  84. zanuda < "1.1.0"

Conflicts

None