package ocamlformat

Build not checked
  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.

Added to opam-repository:

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

Optional Dependencies

None

Used by (91)

  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" & < "0.5.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. highway
  38. js_of_ocaml-webgpu >= "0.2"
  39. letters >= "0.2.0" & != "0.3.1"
  40. lunar
  41. mehari >= "0.5"
  42. melange-fest
  43. melange-fetch >= "0.2.0"
  44. melange-json >= "1.2.0" & < "2.0.0"
  45. melange-radix-icons >= "0.1.0"
  46. melange-str
  47. mlx
  48. module-graph
  49. nel
  50. noCanren
  51. ocaml-lsp-server < "1.9.0"
  52. ocamlmerlin-mlx >= "0.11"
  53. ocp-search
  54. ocplib_stuff >= "0.3.0"
  55. oktree
  56. opam-bin >= "0.9.5"
  57. opam_bin_lib >= "0.9.5"
  58. owi >= "0.2"
  59. pgn_to_tex < "0.1.0"
  60. pidgin
  61. pidgio
  62. polars
  63. polars_async
  64. ppx_deriving_jsonschema < "0.0.7"
  65. prelude >= "0.4"
  66. primavera
  67. psmt2-frontend >= "0.3.0"
  68. query-json
  69. quickjs >= "0.2.0" & < "0.5.0"
  70. rea < "0.2.0"
  71. react-rules-of-hooks-ppx
  72. red-black-tree
  73. SZXX = "3.1.1"
  74. scope
  75. sihl < "0.1.0"
  76. slugline
  77. smtml >= "0.10.0" & < "0.24.0"
  78. solidity-alcotest
  79. solidity-common
  80. solidity-parser
  81. solidity-test
  82. solidity-typechecker
  83. spectrum >= "0.7.0"
  84. styled-ppx
  85. synchronizer
  86. tdigest >= "2.2.1"
  87. tezt = "4.1.0"
  88. virtfs
  89. yamlx = "0.4.0"
  90. yocaml >= "2.0.0"
  91. zanuda < "1.1.0"

Conflicts

None

Build status

Results of building ocamlformat with each compiler on check.ci.ocaml.org, run of against opam-repository 6e2873f. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to β€œAuthorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.30.0 n/a good good good good
0.28.1 good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure